]> 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 a86e7a3f598ebb31b84513922f5ecd5bf1eadd6a..26f2c1c08d6b745fec482a9bf9d9bdc04b0c4fdf 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 671ecc7cc5bc1a473cd40489b7335fad702071bb..7431b62e65659f49771e106e9b3d6440b81c9a8f 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 4337b7cea06b252a6336bfc6765daedd41632238..2a8cbfc50cb68fb2486473cdff25f06561e9f3d4 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 f0fc76e58feb0e8b50a88976b3dca6e14e7d0b41..c675500f45bd9122f619dcbc6c303600bcd88bdb 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 c7223c21398efd1d9020f3dc6d0f9a77ada9efae..369c953b6372dfd4e5e9663d8888b60ad8bff2a0 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 a344a7c7536d5fbbf896998411c96854fb5531c1..5954521f507320a0668bd82f7b921537da6cd9a5 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 f87c47d35c0f19ab1ea04647ad258e7732fd8203..4f12b6d61b830b3ebb04fa0727a769643b66de61 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 0dcd1333d499e027070a754034b9b41ac21aef53..381887663e7e20491b7f2a5cc2305599378f12c7 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 866a41bfbcbca9f684c754c62877101c0757f29b..db804cb744d342749da8ec2c65daf064836b2373 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 92334c18f0b203679f9930528f893e8c3ec9feb2..5443748c99b56674318ad67f5814e3d1630fc181 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 b696ae71eaaf1ac26fea246e827eb8ce6597f43a..087cbebedbe00d600aa13afcd9bbf5b61db669d8 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 2350ccf4bddefd9210272946f9ac0dd74b930cfa..3bc3df15531c88da2069b67da8a17ec1d264d532 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 c9cbf50384096b5e6fe556d18cf893db8f7db2e7..857161ab0cbc5a735452c486a35f0afb97d636af 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;