[Git][cmucl/cmucl][master] Rename stdin/stdout/stderr to proc_*
Raymond Toy
rtoy at common-lisp.net
Sat Oct 7 21:54:12 UTC 2017
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
a5662d50 by Raymond Toy at 2017-10-07T14:54:00-07:00
Rename stdin/stdout/stderr to proc_*
Because we include stdio.h now, Solaris defines stdin, stdout, and
stderr in a way that they can't be used to name the args to the spawn
function. Hence rename these args.
- - - - -
1 changed file:
- src/lisp/runprog.c
Changes:
=====================================
src/lisp/runprog.c
=====================================
--- a/src/lisp/runprog.c
+++ b/src/lisp/runprog.c
@@ -16,7 +16,7 @@
pid_t
spawn(char *program, char *argv[], char *envp[], char *pty_name,
- int stdin, int stdout, int stderr)
+ int proc_stdin, int proc_stdout, int proc_stderr)
{
pid_t pid;
sigset_t set;
@@ -51,12 +51,12 @@ spawn(char *program, char *argv[], char *envp[], char *pty_name,
}
/* Set up stdin, stdout, and stderr. */
- if (stdin >= 0)
- dup2(stdin, 0);
- if (stdout >= 0)
- dup2(stdout, 1);
- if (stderr >= 0)
- dup2(stderr, 2);
+ if (proc_stdin >= 0)
+ dup2(proc_stdin, 0);
+ if (proc_stdout >= 0)
+ dup2(proc_stdout, 1);
+ if (proc_stderr >= 0)
+ dup2(proc_stderr, 2);
/* Close all other fds. */
for (fd = sysconf(_SC_OPEN_MAX) - 1; fd >= 3; fd--)
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/a5662d500a6e3d589dbd3702b06e7e6d3d38bccd
---
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/a5662d500a6e3d589dbd3702b06e7e6d3d38bccd
You're receiving this email because of your account on gitlab.common-lisp.net.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20171007/ef25b88b/attachment-0001.html>
More information about the cmucl-cvs
mailing list