From: Ken Hornstein Date: Fri, 1 Feb 2013 17:30:45 +0000 (-0500) Subject: Finally switch over from vfork() to fork() completely. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/bacd74669e1b6614519259f7eaba98da54f9c97c?hp=3b6be5607a251a3a793e97382e251ce66ea2bca0 Finally switch over from vfork() to fork() completely. --- diff --git a/sbr/ext_hook.c b/sbr/ext_hook.c index a86e7a3f..26f2c1c0 100644 --- a/sbr/ext_hook.c +++ b/sbr/ext_hook.c @@ -25,7 +25,7 @@ ext_hook(char *hook_name, char *message_file_name_1, char *message_file_name_2) if ((hook = context_find(hook_name)) == (char *)0) return (OK); - switch (pid = vfork()) { + switch (pid = fork()) { case -1: status = NOTOK; advise(NULL, "external database may be out-of-date."); diff --git a/sbr/folder_delmsgs.c b/sbr/folder_delmsgs.c index 671ecc7c..7431b62e 100644 --- a/sbr/folder_delmsgs.c +++ b/sbr/folder_delmsgs.c @@ -61,7 +61,7 @@ folder_delmsgs (struct msgs *mp, int unlink_msgs, int nohook) fflush (stdout); - switch (pid = vfork()) { + switch (pid = fork()) { case -1: advise ("fork", "unable to"); return -1; diff --git a/sbr/makedir.c b/sbr/makedir.c index 4337b7ce..2a8cbfc5 100644 --- a/sbr/makedir.c +++ b/sbr/makedir.c @@ -85,7 +85,7 @@ makedir (char *dir) nested directories like the above code can. -- Dan Harkless */ - switch (pid = vfork()) { + switch (pid = fork()) { case -1: advise ("fork", "unable to"); return 0; diff --git a/sbr/refile.c b/sbr/refile.c index f0fc76e5..c675500f 100644 --- a/sbr/refile.c +++ b/sbr/refile.c @@ -35,7 +35,7 @@ refile (char **arg, char *file) context_save(); /* save the context file */ fflush(stdout); - switch (pid = vfork()) { + switch (pid = fork()) { case -1: advise ("fork", "unable to"); return -1; diff --git a/sbr/showfile.c b/sbr/showfile.c index c7223c21..369c953b 100644 --- a/sbr/showfile.c +++ b/sbr/showfile.c @@ -28,7 +28,7 @@ showfile (char **arg, char *file) if (!strcmp (r1bindex (lproc, '/'), "mhl")) lproc = mhlproc; - switch (pid = vfork()) { + switch (pid = fork()) { case -1: /* fork error */ advise ("fork", "unable to"); diff --git a/uip/mhbuildsbr.c b/uip/mhbuildsbr.c index a344a7c7..5954521f 100644 --- a/uip/mhbuildsbr.c +++ b/uip/mhbuildsbr.c @@ -1096,7 +1096,7 @@ raw: if ((out = fopen (ce->ce_file, "w")) == NULL) adios (ce->ce_file, "unable to open for writing"); - for (i = 0; (child_id = vfork()) == NOTOK && i > 5; i++) + for (i = 0; (child_id = fork()) == NOTOK && i > 5; i++) sleep (5); switch (child_id) { case NOTOK: diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index f87c47d3..4f12b6d6 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -1657,7 +1657,7 @@ m_popen (char *name) if (pipe (pd) == NOTOK) adios ("pipe", "unable to"); - switch (m_pid = vfork()) { + switch (m_pid = fork()) { case NOTOK: adios ("fork", "unable to"); diff --git a/uip/mhparse.c b/uip/mhparse.c index 0dcd1333..38188766 100644 --- a/uip/mhparse.c +++ b/uip/mhparse.c @@ -2628,7 +2628,7 @@ openFTP (CT ct, char **file) fflush (stdout); - for (i = 0; (child_id = vfork()) == NOTOK && i < 5; i++) + for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++) sleep (5); switch (child_id) { case NOTOK: @@ -2770,7 +2770,7 @@ openMail (CT ct, char **file) vec[vecp++] = e->eb_body; vec[vecp] = NULL; - for (i = 0; (child_id = vfork()) == NOTOK && i < 5; i++) + for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++) sleep (5); switch (child_id) { case NOTOK: diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index 866a41bf..db804cb7 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -191,7 +191,7 @@ DisplayMsgHeader (CT ct, char *form) fflush (stdout); - for (i = 0; (child_id = vfork()) == NOTOK && i < 5; i++) + for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++) sleep (5); switch (child_id) { @@ -560,7 +560,7 @@ show_content_aux2 (CT ct, int serial, int alternate, char *cracked, char *buffer fflush (stdout); - for (i = 0; (child_id = vfork()) == NOTOK && i < 5; i++) + for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++) sleep (5); switch (child_id) { case NOTOK: diff --git a/uip/rcvtty.c b/uip/rcvtty.c index 92334c18..5443748c 100644 --- a/uip/rcvtty.c +++ b/uip/rcvtty.c @@ -192,7 +192,7 @@ message_fd (char **vec) fd = mkstemp (strncpy (tmpfil, "/tmp/rcvttyXXXXX", sizeof(tmpfil))); unlink (tmpfil); - if ((child_id = vfork()) == NOTOK) { + if ((child_id = fork()) == NOTOK) { /* fork error */ close (fd); return header_fd (); diff --git a/uip/replsbr.c b/uip/replsbr.c index b696ae71..087cbebe 100644 --- a/uip/replsbr.c +++ b/uip/replsbr.c @@ -424,7 +424,7 @@ replfilter (FILE *in, FILE *out, char *filter, int fmtproc) rewind (in); lseek (fileno(in), (off_t) 0, SEEK_SET); - switch (pid = vfork()) { + switch (pid = fork()) { case NOTOK: adios ("fork", "unable to"); diff --git a/uip/sendsbr.c b/uip/sendsbr.c index 2350ccf4..3bc3df15 100644 --- a/uip/sendsbr.c +++ b/uip/sendsbr.c @@ -838,7 +838,7 @@ sendaux (char **vec, int vecp, char *drft, struct stat *st) done (1); vec[vecp] = NULL; - for (i = 0; (child_id = vfork()) == NOTOK && i < 5; i++) + for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++) sleep (5); switch (child_id) { diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index c9cbf503..857161ab 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -697,7 +697,7 @@ editfile (char **ed, char **arg, char *file, int use, struct msgs *mp, context_save (); /* save the context file */ fflush (stdout); - switch (pid = vfork()) { + switch (pid = fork()) { case NOTOK: advise ("fork", "unable to"); status = NOTOK; @@ -845,7 +845,7 @@ sendfile (char **arg, char *file, int pushsw) context_save (); /* save the context file */ fflush (stdout); - for (i = 0; (child_id = vfork()) == NOTOK && i < 5; i++) + for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++) sleep (5); switch (child_id) { case NOTOK: @@ -1331,7 +1331,7 @@ whomfile (char **arg, char *file) context_save (); /* save the context file */ fflush (stdout); - switch (pid = vfork()) { + switch (pid = fork()) { case NOTOK: advise ("fork", "unable to"); return 1;