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
commit31f3ffe8a1e9c24433441fd0f3353de02edfc7e1 (patch)
treefe07174cab4eba5d50ee5ad04684cfee6e454b08 /job.c
parent127757adcbc281e3cd1476947bebc9131ae05d27 (diff)
downloadmake-31f3ffe8a1e9c24433441fd0f3353de02edfc7e1.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 966a1bd4..daf3efef 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__ */