comparison src/callproc.c @ 100:4be1180a9e89 r20-1b2

Import from CVS: tag r20-1b2
author cvs
date Mon, 13 Aug 2007 09:15:11 +0200
parents 1ce6082ce73f
children fe104dbd9147
comparison
equal deleted inserted replaced
99:2d83cbd90d8d 100:4be1180a9e89
33 #include "window.h" 33 #include "window.h"
34 #ifdef MULE 34 #ifdef MULE
35 #include "mule-coding.h" 35 #include "mule-coding.h"
36 #endif 36 #endif
37 37
38 #include "sysfile.h"
39 #include "systime.h" 38 #include "systime.h"
40 #include "sysproc.h" 39 #include "sysproc.h"
40 #include "sysfile.h" /* Always include after sysproc.h */
41 #include "syssignal.h" /* Always include before systty.h */ 41 #include "syssignal.h" /* Always include before systty.h */
42 #include "systty.h" 42 #include "systty.h"
43 43
44 #ifdef WINDOWSNT
45 #define _P_NOWAIT 1 /* from process.h */
46 #endif
44 47
45 #ifdef DOS_NT 48 #ifdef DOS_NT
46 /* When we are starting external processes we need to know whether they 49 /* When we are starting external processes we need to know whether they
47 take binary input (no conversion) or text input (\n is converted to 50 take binary input (no conversion) or text input (\n is converted to
48 \r\n). Similar for output: if newlines are written as \r\n then it's 51 \r\n). Similar for output: if newlines are written as \r\n then it's
340 fd[1] = open (NULL_DEVICE, O_WRONLY, 0); 343 fd[1] = open (NULL_DEVICE, O_WRONLY, 0);
341 fd[0] = -1; 344 fd[0] = -1;
342 } 345 }
343 else 346 else
344 { 347 {
345 #ifdef WINDOWSNT
346 pipe_with_inherited_out (fd);
347 #else /* not WINDOWSNT */
348 pipe (fd); 348 pipe (fd);
349 #endif /* not WINDOWSNT */
350 #if 0 349 #if 0
351 /* Replaced by close_process_descs */ 350 /* Replaced by close_process_descs */
352 set_exclusive_use (fd[0]); 351 set_exclusive_use (fd[0]);
353 #endif 352 #endif
354 } 353 }
637 a decent error from within the child, this should be verified as an 636 a decent error from within the child, this should be verified as an
638 executable directory by the parent. */ 637 executable directory by the parent. */
639 638
640 static int relocate_fd (int fd, int min); 639 static int relocate_fd (int fd, int min);
641 640
641 #ifdef WINDOWSNT
642 int
643 #else
642 void 644 void
645 #endif
643 child_setup (int in, int out, int err, char **new_argv, 646 child_setup (int in, int out, int err, char **new_argv,
644 CONST char *current_dir) 647 CONST char *current_dir)
645 { 648 {
646 #ifdef MSDOS 649 #ifdef MSDOS
647 /* The MSDOS port of gcc cannot fork, vfork, ... so we must call system 650 /* The MSDOS port of gcc cannot fork, vfork, ... so we must call system