aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorRichard M. Stallman1998-08-08 00:49:24 +0000
committerRichard M. Stallman1998-08-08 00:49:24 +0000
commit4525f571f59325bf72846c8ab38263f8b78a2e64 (patch)
tree43623c9be971f405363419ede31e942d38882085 /src/process.c
parentcef7e1da5f8702706675c074cd3816249f1bfc3a (diff)
downloademacs-4525f571f59325bf72846c8ab38263f8b78a2e64.tar.gz
emacs-4525f571f59325bf72846c8ab38263f8b78a2e64.zip
(Fprocess_send_eof): Transfer proc_encode_coding_system
data to the new outfd.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/process.c b/src/process.c
index 2cfd00917ae..2ca75250706 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3850,6 +3850,8 @@ text to PROCESS after you call this function.")
3850 send_process (proc, "\004", 1, Qnil); 3850 send_process (proc, "\004", 1, Qnil);
3851 else 3851 else
3852 { 3852 {
3853 int old_outfd, new_outfd;
3854
3853#ifdef HAVE_SHUTDOWN 3855#ifdef HAVE_SHUTDOWN
3854 /* If this is a network connection, or socketpair is used 3856 /* If this is a network connection, or socketpair is used
3855 for communication with the subprocess, call shutdown to cause EOF. 3857 for communication with the subprocess, call shutdown to cause EOF.
@@ -3864,7 +3866,19 @@ text to PROCESS after you call this function.")
3864#else /* not HAVE_SHUTDOWN */ 3866#else /* not HAVE_SHUTDOWN */
3865 close (XINT (XPROCESS (proc)->outfd)); 3867 close (XINT (XPROCESS (proc)->outfd));
3866#endif /* not HAVE_SHUTDOWN */ 3868#endif /* not HAVE_SHUTDOWN */
3867 XSETINT (XPROCESS (proc)->outfd, open (NULL_DEVICE, O_WRONLY)); 3869 new_outfd = open (NULL_DEVICE, O_WRONLY);
3870 old_outfd = XINT (XPROCESS (proc)->outfd);
3871
3872 if (!proc_encode_coding_system[new_outfd])
3873 proc_encode_coding_system[new_outfd]
3874 = (struct coding_system *) xmalloc (sizeof (struct coding_system));
3875 bcopy (proc_encode_coding_system[old_outfd],
3876 proc_encode_coding_system[new_outfd],
3877 sizeof (struct coding_system));
3878 bzero (proc_encode_coding_system[old_outfd],
3879 sizeof (struct coding_system));
3880
3881 XSETINT (XPROCESS (proc)->outfd, new_outfd);
3868 } 3882 }
3869#endif /* VMS */ 3883#endif /* VMS */
3870 return process; 3884 return process;