Changeset 947
- Timestamp:
- Jan 11, 2004, 5:51:02 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/binutils/libiberty/pex-os2.c
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r946 r947 47 47 #define INCL_BASE 48 48 #include <os2.h> 49 #include <sys/fcntl.h> 49 50 50 51 int … … 93 94 output_desc = pdes[WRITE_PORT]; 94 95 last_pipe_input = pdes[READ_PORT]; 96 /* we don't wanna have an extra handles in the child. */ 97 fcntl (pdes[READ_PORT], F_SETFD, FD_CLOEXEC); 98 fcntl (pdes[WRITE_PORT], F_SETFD, FD_CLOEXEC); 95 99 } 96 100 else … … 99 103 { 100 104 org_stdin = dup (STDIN_FILE_NO); 105 fcntl (org_stdin, F_SETFD, FD_CLOEXEC); 101 106 dup2 (input_desc, STDIN_FILE_NO); 107 fcntl (STDIN_FILE_NO, F_SETFD, 0); /* paranoia. but what's the deal with this flag over dup? */ 102 108 close (input_desc); 103 109 } … … 105 111 { 106 112 org_stdout = dup (STDOUT_FILE_NO); 113 fcntl (org_stdout, F_SETFD, FD_CLOEXEC); 107 114 dup2 (output_desc, STDOUT_FILE_NO); 115 fcntl (STDOUT_FILE_NO, F_SETFD, 0); /* paranoia. but what's the deal with this flag over dup? */ 108 116 close (output_desc); 109 117 } 118 110 119 pid = (flags & PEXECUTE_SEARCH ? spawnvp : spawnv) (P_NOWAIT, program, argv); 120 111 121 if (pipes_supported && input_desc != STDIN_FILE_NO) 112 122 { 113 123 dup2 (org_stdin, STDIN_FILE_NO); 124 fcntl (STDIN_FILE_NO, F_SETFD, 0); /* paranoia. but what's the deal with this flag over dup? */ 114 125 close (org_stdin); 115 126 } … … 117 128 { 118 129 dup2 (org_stdout, STDOUT_FILE_NO); 130 fcntl (STDOUT_FILE_NO, F_SETFD, 0); /* paranoia. but what's the deal with this flag over dup? */ 119 131 close (org_stdout); 120 132 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.