Mercurial > emacs
comparison src/process.c @ 18329:ddaafa596bf5
(Fprocess_send_eof): Prooperly conditionalize prev. change.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 19 Jun 1997 08:13:44 +0000 |
parents | 0295bbed3c39 |
children | 22cd8d7dd5aa |
comparison
equal
deleted
inserted
replaced
18328:0295bbed3c39 | 18329:ddaafa596bf5 |
---|---|
3616 #else | 3616 #else |
3617 if (!NILP (XPROCESS (proc)->pty_flag)) | 3617 if (!NILP (XPROCESS (proc)->pty_flag)) |
3618 send_process (proc, "\004", 1, Qnil); | 3618 send_process (proc, "\004", 1, Qnil); |
3619 else | 3619 else |
3620 { | 3620 { |
3621 #ifdef HAVE_SHUTDOWN | |
3621 /* If this is a network connection, or socketpair is used | 3622 /* If this is a network connection, or socketpair is used |
3622 for communication with the subprocess, call shutdown to cause EOF. | 3623 for communication with the subprocess, call shutdown to cause EOF. |
3623 (In some old system, shutdown to socketpair doesn't work. | 3624 (In some old system, shutdown to socketpair doesn't work. |
3624 Then we just can't win.) */ | 3625 Then we just can't win.) */ |
3625 if (NILP (XPROCESS (proc)->pid) | 3626 if (NILP (XPROCESS (proc)->pid) |
3626 || XINT (XPROCESS (proc)->outfd) == XINT (XPROCESS (proc)->infd)) | 3627 || XINT (XPROCESS (proc)->outfd) == XINT (XPROCESS (proc)->infd)) |
3627 shutdown (XINT (XPROCESS (proc)->outfd), 1); | 3628 shutdown (XINT (XPROCESS (proc)->outfd), 1); |
3628 /* In case of socketpair, outfd == infd, so don't close it. */ | 3629 /* In case of socketpair, outfd == infd, so don't close it. */ |
3629 if (XINT (XPROCESS (proc)->outfd) != XINT (XPROCESS (proc)->infd)) | 3630 if (XINT (XPROCESS (proc)->outfd) != XINT (XPROCESS (proc)->infd)) |
3630 close (XINT (XPROCESS (proc)->outfd)); | 3631 close (XINT (XPROCESS (proc)->outfd)); |
3632 #else /* not HAVE_SHUTDOWN */ | |
3633 close (XINT (XPROCESS (proc)->outfd)); | |
3634 #endif /* not HAVE_SHUTDOWN */ | |
3631 XSETINT (XPROCESS (proc)->outfd, open (NULL_DEVICE, O_WRONLY)); | 3635 XSETINT (XPROCESS (proc)->outfd, open (NULL_DEVICE, O_WRONLY)); |
3632 } | 3636 } |
3633 #endif /* VMS */ | 3637 #endif /* VMS */ |
3634 return process; | 3638 return process; |
3635 } | 3639 } |