summaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2013-05-06 00:22:27 -0400
committerPaul Smith <psmith@gnu.org>2013-05-06 00:22:27 -0400
commit94735f0ad7f67c56afa1513381c73e8f62cd44fc (patch)
treefe07174cab4eba5d50ee5ad04684cfee6e454b08 /job.c
parent7c77486d1fbc820e6db97a5a11fabdc34dbdb729 (diff)
downloadgunmake-94735f0ad7f67c56afa1513381c73e8f62cd44fc.tar.gz
Remove use of vfork().
GCC was giving us warnings, most OS's now just run fork() when you call vfork(), and looking at the standard definition of vfork() we are a long way from using it safely anyway: you're not allowed to even call a function before you exec().
Diffstat (limited to 'job.c')
-rw-r--r--job.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/job.c b/job.c
index 966a1bd..daf3efe 100644
--- a/job.c
+++ b/job.c
@@ -1380,9 +1380,8 @@ start_job_command (struct child *child)
#endif
int print_cmd;
int sync_cmd;
+ int flags;
char *p;
- /* Must be volatile to silence bogus GCC warning about longjmp/vfork. */
- volatile int flags;
#ifdef VMS
char *argv;
#else
@@ -1677,7 +1676,7 @@ start_job_command (struct child *child)
#ifdef VMS
if (!child_execute_job (argv, child)) {
/* Fork failed! */
- perror_with_name ("vfork", "");
+ perror_with_name ("fork", "");
goto error;
}
@@ -1718,7 +1717,7 @@ start_job_command (struct child *child)
#else /* !__EMX__ */
- child->pid = vfork ();
+ child->pid = fork ();
environ = parent_environ; /* Restore value child may have clobbered. */
if (child->pid == 0)
{
@@ -1764,7 +1763,7 @@ start_job_command (struct child *child)
{
/* Fork failed! */
unblock_sigs ();
- perror_with_name ("vfork", "");
+ perror_with_name ("fork", "");
goto error;
}
# endif /* !__EMX__ */