From 94735f0ad7f67c56afa1513381c73e8f62cd44fc Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Mon, 6 May 2013 00:22:27 -0400 Subject: 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(). --- job.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'job.c') 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__ */ -- cgit v1.2.3