Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
- 
a5662d50
by Raymond Toy at 2017-10-07T14:54:00-07:00
1 changed file:
Changes:
| ... | ... | @@ -16,7 +16,7 @@ | 
| 16 | 16 |  | 
| 17 | 17 |  pid_t
 | 
| 18 | 18 |  spawn(char *program, char *argv[], char *envp[], char *pty_name,
 | 
| 19 | -      int stdin, int stdout, int stderr)
 | |
| 19 | +      int proc_stdin, int proc_stdout, int proc_stderr)
 | |
| 20 | 20 |  {
 | 
| 21 | 21 |      pid_t pid;
 | 
| 22 | 22 |      sigset_t set;
 | 
| ... | ... | @@ -51,12 +51,12 @@ spawn(char *program, char *argv[], char *envp[], char *pty_name, | 
| 51 | 51 |      }
 | 
| 52 | 52 |  | 
| 53 | 53 |      /* Set up stdin, stdout, and stderr. */
 | 
| 54 | -    if (stdin >= 0)
 | |
| 55 | -	dup2(stdin, 0);
 | |
| 56 | -    if (stdout >= 0)
 | |
| 57 | -	dup2(stdout, 1);
 | |
| 58 | -    if (stderr >= 0)
 | |
| 59 | -	dup2(stderr, 2);
 | |
| 54 | +    if (proc_stdin >= 0)
 | |
| 55 | +	dup2(proc_stdin, 0);
 | |
| 56 | +    if (proc_stdout >= 0)
 | |
| 57 | +	dup2(proc_stdout, 1);
 | |
| 58 | +    if (proc_stderr >= 0)
 | |
| 59 | +	dup2(proc_stderr, 2);
 | |
| 60 | 60 |  | 
| 61 | 61 |      /* Close all other fds. */
 | 
| 62 | 62 |      for (fd = sysconf(_SC_OPEN_MAX) - 1; fd >= 3; fd--)
 |