Mercurial > emacs
comparison src/process.c @ 95900:99342636fa96
(Fserial_process_configure, Fprocess_send_eof):
Use EQ to compare Lisp_Objects.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 13 Jun 2008 16:35:17 +0000 |
parents | d6a4488883dc |
children | ddedcecb18ef |
comparison
equal
deleted
inserted
replaced
95899:d5d7186027e2 | 95900:99342636fa96 |
---|---|
2792 proc = Fplist_get (contact, QCbuffer); | 2792 proc = Fplist_get (contact, QCbuffer); |
2793 if (NILP (proc)) | 2793 if (NILP (proc)) |
2794 proc = Fplist_get (contact, QCport); | 2794 proc = Fplist_get (contact, QCport); |
2795 proc = get_process (proc); | 2795 proc = get_process (proc); |
2796 p = XPROCESS (proc); | 2796 p = XPROCESS (proc); |
2797 if (p->type != Qserial) | 2797 if (!EQ (p->type, Qserial)) |
2798 error ("Not a serial process"); | 2798 error ("Not a serial process"); |
2799 | 2799 |
2800 if (NILP (Fplist_get (p->childp, QCspeed))) | 2800 if (NILP (Fplist_get (p->childp, QCspeed))) |
2801 { | 2801 { |
2802 UNGCPRO; | 2802 UNGCPRO; |
6676 #ifdef VMS | 6676 #ifdef VMS |
6677 send_process (proc, "\032", 1, Qnil); /* ^z */ | 6677 send_process (proc, "\032", 1, Qnil); /* ^z */ |
6678 #else | 6678 #else |
6679 if (XPROCESS (proc)->pty_flag) | 6679 if (XPROCESS (proc)->pty_flag) |
6680 send_process (proc, "\004", 1, Qnil); | 6680 send_process (proc, "\004", 1, Qnil); |
6681 else if (XPROCESS (proc)->type == Qserial) | 6681 else if (EQ (XPROCESS (proc)->type, Qserial)) |
6682 { | 6682 { |
6683 #ifdef HAVE_TERMIOS | 6683 #ifdef HAVE_TERMIOS |
6684 if (tcdrain (XPROCESS (proc)->outfd) != 0) | 6684 if (tcdrain (XPROCESS (proc)->outfd) != 0) |
6685 error ("tcdrain() failed: %s", emacs_strerror (errno)); | 6685 error ("tcdrain() failed: %s", emacs_strerror (errno)); |
6686 #endif | 6686 #endif |
6693 #ifdef HAVE_SHUTDOWN | 6693 #ifdef HAVE_SHUTDOWN |
6694 /* If this is a network connection, or socketpair is used | 6694 /* If this is a network connection, or socketpair is used |
6695 for communication with the subprocess, call shutdown to cause EOF. | 6695 for communication with the subprocess, call shutdown to cause EOF. |
6696 (In some old system, shutdown to socketpair doesn't work. | 6696 (In some old system, shutdown to socketpair doesn't work. |
6697 Then we just can't win.) */ | 6697 Then we just can't win.) */ |
6698 if (XPROCESS (proc)->type == Qnetwork | 6698 if (EQ (XPROCESS (proc)->type, Qnetwork) |
6699 || XPROCESS (proc)->outfd == XPROCESS (proc)->infd) | 6699 || XPROCESS (proc)->outfd == XPROCESS (proc)->infd) |
6700 shutdown (XPROCESS (proc)->outfd, 1); | 6700 shutdown (XPROCESS (proc)->outfd, 1); |
6701 /* In case of socketpair, outfd == infd, so don't close it. */ | 6701 /* In case of socketpair, outfd == infd, so don't close it. */ |
6702 if (XPROCESS (proc)->outfd != XPROCESS (proc)->infd) | 6702 if (XPROCESS (proc)->outfd != XPROCESS (proc)->infd) |
6703 emacs_close (XPROCESS (proc)->outfd); | 6703 emacs_close (XPROCESS (proc)->outfd); |