# HG changeset patch # User Miles Bader # Date 836683359 0 # Node ID b43e16d8ab5b9dc9f616a60805e3e21eeeb7c6e3 # Parent 036ab27f7ea8a8b3f2b19557f81f852c4677d442 (Fcall_process) [MSDOS]: Initialize fd[0]; unlink `tempfile' in case of errors. Make the `tempfile' parameter passed to `report_file_error' be a Lisp string. (Fcall_process): When fd_error is negative, don't close fd[0] if it's same as filefd. If stderr is redirected to NULL_DEVICE, make `report_file_error' print the name of device. Make the arguments a cons cell. diff -r 036ab27f7ea8 -r b43e16d8ab5b src/callproc.c --- a/src/callproc.c Sat Jul 06 20:02:35 1996 +0000 +++ b/src/callproc.c Sat Jul 06 20:02:39 1996 +0000 @@ -350,10 +350,12 @@ if (outfilefd < 0) { close (filefd); - report_file_error ("Opening process output file", Fcons (tempfile, Qnil)); + report_file_error ("Opening process output file", + Fcons (build_string (tempfile), Qnil)); } + fd[0] = filefd; fd[1] = outfilefd; -#endif +#endif /* MSDOS */ if (INTEGERP (buffer)) fd[1] = open (NULL_DEVICE, O_WRONLY), fd[0] = -1; @@ -404,10 +406,17 @@ if (fd_error < 0) { close (filefd); - close (fd[0]); + if (fd[0] != filefd) + close (fd[0]); if (fd1 >= 0) close (fd1); - report_file_error ("Cannot open", error_file); +#ifdef MSDOS + unlink (tempfile); +#endif + report_file_error ("Cannot redirect stderr", + Fcons ((NILP (error_file) + ? build_string (NULL_DEVICE) : error_file), + Qnil)); } #ifdef MSDOS /* MW, July 1993 */ /* ??? Someone who knows MSDOG needs to check whether this properly