>>>> "Vin" == Vin Shelton <acs(a)xemacs.org>
writes:
Vin> I will be releasing the code currently checked in to the 21.1 branch
Vin> as 21.1.12, probably on Friday or Saturday unless I hear of any
Vin> problems with the code as it now stands. This is, therefore, an
Vin> urgent plea for people to build and install the latest 21.1 from CVS.
One more patch:
I haven't actually tested them (a fair amount of work), but they seem
safe, and I *have* observed the symptom
Doing fork: bad file number
that I am trying to fix.
I will apply to 21.2. Vin can apply to 21.1.
./src/ChangeLog:
2000-08-03 Martin Buchholz <martin(a)xemacs.org>
* callproc.c (Fcall_process_internal):
(Fcall_process_internal):
* process-unix.c (unix_create_process):
Save and restore the value of errno, so that error messages are accurate.
Index: ./src/process-unix.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/process-unix.c,v
retrieving revision 1.15
diff -u -w -r1.15 process-unix.c
--- process-unix.c 2000/05/02 04:12:07 1.15
+++ process-unix.c 2000/08/03 06:06:42
@@ -954,7 +954,9 @@
if (pid < 0)
{
+ int save_errno = errno;
close_descriptor_pair (forkin, forkout);
+ errno = save_errno;
report_file_error ("Doing fork", Qnil);
}
Index: ./src/callproc.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/callproc.c,v
retrieving revision 1.34
diff -u -w -r1.34 callproc.c
--- callproc.c 2000/07/15 00:45:13 1.34
+++ callproc.c 2000/08/03 06:06:43
@@ -372,10 +372,12 @@
if (fd_error < 0)
{
+ int save_errno = errno;
close (filefd);
close (fd[0]);
if (fd1 >= 0)
close (fd1);
+ errno = save_errno;
report_file_error ("Cannot open", Fcons(error_file, Qnil));
}
@@ -438,8 +440,10 @@
#ifndef WINDOWSNT
if (pid < 0)
{
+ int save_errno = errno;
if (fd[0] >= 0)
close (fd[0]);
+ errno = save_errno;
report_file_error ("Doing fork", Qnil);
}
#endif