]> diplodocus.org Git - nmh/commitdiff
Finally switch over from vfork() to fork() completely.
authorKen Hornstein <kenh@pobox.com>
Fri, 1 Feb 2013 17:30:45 +0000 (12:30 -0500)
committerKen Hornstein <kenh@pobox.com>
Fri, 1 Feb 2013 17:30:45 +0000 (12:30 -0500)
13 files changed:
sbr/ext_hook.c
sbr/folder_delmsgs.c
sbr/makedir.c
sbr/refile.c
sbr/showfile.c
uip/mhbuildsbr.c
uip/mhlsbr.c
uip/mhparse.c
uip/mhshowsbr.c
uip/rcvtty.c
uip/replsbr.c
uip/sendsbr.c
uip/whatnowsbr.c

index a86e7a3..26f2c1c 100644 (file)
@@ -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);
 
     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.");
     case -1:
        status = NOTOK;
        advise(NULL, "external database may be out-of-date.");
index 671ecc7..7431b62 100644 (file)
@@ -61,7 +61,7 @@ folder_delmsgs (struct msgs *mp, int unlink_msgs, int nohook)
 
        fflush (stdout);
 
 
        fflush (stdout);
 
-       switch (pid = vfork()) {
+       switch (pid = fork()) {
        case -1:
            advise ("fork", "unable to");
            return -1;
        case -1:
            advise ("fork", "unable to");
            return -1;
index 4337b7c..2a8cbfc 100644 (file)
@@ -85,7 +85,7 @@ makedir (char *dir)
           nested directories like the above code can.
 
           -- Dan Harkless <dan-nmh@dilvish.speed.net> */
           nested directories like the above code can.
 
           -- Dan Harkless <dan-nmh@dilvish.speed.net> */
-       switch (pid = vfork()) {
+       switch (pid = fork()) {
            case -1: 
                advise ("fork", "unable to");
                return 0;
            case -1: 
                advise ("fork", "unable to");
                return 0;
index f0fc76e..c675500 100644 (file)
@@ -35,7 +35,7 @@ refile (char **arg, char *file)
     context_save();    /* save the context file */
     fflush(stdout);
 
     context_save();    /* save the context file */
     fflush(stdout);
 
-    switch (pid = vfork()) {
+    switch (pid = fork()) {
        case -1: 
            advise ("fork", "unable to");
            return -1;
        case -1: 
            advise ("fork", "unable to");
            return -1;
index c7223c2..369c953 100644 (file)
@@ -28,7 +28,7 @@ showfile (char **arg, char *file)
     if (!strcmp (r1bindex (lproc, '/'), "mhl"))
        lproc = mhlproc;
 
     if (!strcmp (r1bindex (lproc, '/'), "mhl"))
        lproc = mhlproc;
 
-    switch (pid = vfork()) {
+    switch (pid = fork()) {
     case -1:
        /* fork error */
        advise ("fork", "unable to");
     case -1:
        /* fork error */
        advise ("fork", "unable to");
index a344a7c..5954521 100644 (file)
@@ -1096,7 +1096,7 @@ raw:
            if ((out = fopen (ce->ce_file, "w")) == NULL)
                adios (ce->ce_file, "unable to open for writing");
 
            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:
                sleep (5);
            switch (child_id) {
            case NOTOK:
index f87c47d..4f12b6d 100644 (file)
@@ -1657,7 +1657,7 @@ m_popen (char *name)
     if (pipe (pd) == NOTOK)
        adios ("pipe", "unable to");
 
     if (pipe (pd) == NOTOK)
        adios ("pipe", "unable to");
 
-    switch (m_pid = vfork()) {
+    switch (m_pid = fork()) {
        case NOTOK: 
            adios ("fork", "unable to");
 
        case NOTOK: 
            adios ("fork", "unable to");
 
index 0dcd133..3818876 100644 (file)
@@ -2628,7 +2628,7 @@ openFTP (CT ct, char **file)
 
        fflush (stdout);
 
 
        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:
            sleep (5);
        switch (child_id) {
            case NOTOK:
@@ -2770,7 +2770,7 @@ openMail (CT ct, char **file)
     vec[vecp++] = e->eb_body;
     vec[vecp] = NULL;
 
     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:
        sleep (5);
     switch (child_id) {
        case NOTOK:
index 866a41b..db804cb 100644 (file)
@@ -191,7 +191,7 @@ DisplayMsgHeader (CT ct, char *form)
 
     fflush (stdout);
 
 
     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) {
        sleep (5);
 
     switch (child_id) {
@@ -560,7 +560,7 @@ show_content_aux2 (CT ct, int serial, int alternate, char *cracked, char *buffer
 
     fflush (stdout);
 
 
     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:
        sleep (5);
     switch (child_id) {
        case NOTOK:
index 92334c1..5443748 100644 (file)
@@ -192,7 +192,7 @@ message_fd (char **vec)
     fd = mkstemp (strncpy (tmpfil, "/tmp/rcvttyXXXXX", sizeof(tmpfil)));
     unlink (tmpfil);
 
     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 ();
        /* fork error */
        close (fd);
        return header_fd ();
index b696ae7..087cbeb 100644 (file)
@@ -424,7 +424,7 @@ replfilter (FILE *in, FILE *out, char *filter, int fmtproc)
     rewind (in);
     lseek (fileno(in), (off_t) 0, SEEK_SET);
 
     rewind (in);
     lseek (fileno(in), (off_t) 0, SEEK_SET);
 
-    switch (pid = vfork()) {
+    switch (pid = fork()) {
        case NOTOK: 
            adios ("fork", "unable to");
 
        case NOTOK: 
            adios ("fork", "unable to");
 
index 2350ccf..3bc3df1 100644 (file)
@@ -838,7 +838,7 @@ sendaux (char **vec, int vecp, char *drft, struct stat *st)
        done (1);
     vec[vecp] = NULL;
 
        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) {
        sleep (5);
 
     switch (child_id) {
index c9cbf50..857161a 100644 (file)
@@ -697,7 +697,7 @@ editfile (char **ed, char **arg, char *file, int use, struct msgs *mp,
     context_save ();   /* save the context file */
     fflush (stdout);
 
     context_save ();   /* save the context file */
     fflush (stdout);
 
-    switch (pid = vfork()) {
+    switch (pid = fork()) {
        case NOTOK:
            advise ("fork", "unable to");
            status = NOTOK;
        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);
 
     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:
        sleep (5);
     switch (child_id) {
        case NOTOK:
@@ -1331,7 +1331,7 @@ whomfile (char **arg, char *file)
     context_save ();   /* save the context file */
     fflush (stdout);
 
     context_save ();   /* save the context file */
     fflush (stdout);
 
-    switch (pid = vfork()) {
+    switch (pid = fork()) {
        case NOTOK:
            advise ("fork", "unable to");
            return 1;
        case NOTOK:
            advise ("fork", "unable to");
            return 1;