fix to allow shell scripts to run in background
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Mon, 7 Jun 1982 04:06:15 +0000 (20:06 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Mon, 7 Jun 1982 04:06:15 +0000 (20:06 -0800)
SCCS-vsn: bin/csh/csh.c 4.9

usr/src/bin/csh/csh.c

index 5387a8b..fb2aa79 100644 (file)
@@ -1,4 +1,4 @@
-static char *sccsid = "@(#)csh.c 4.8 %G%";
+static char *sccsid = "@(#)csh.c 4.9 %G%";
 
 #include "sh.h"
 #include <sys/ioctl.h>
 
 #include "sh.h"
 #include <sys/ioctl.h>
@@ -231,7 +231,7 @@ main(c, av)
         * Note that in only the login shell is it likely that parent
         * may have set signals to be ignored
         */
         * Note that in only the login shell is it likely that parent
         * may have set signals to be ignored
         */
-       if (loginsh || intact || intty && isatty(SHOUT) || parintr == SIG_DFL)
+       if (loginsh || intact || intty && isatty(SHOUT))
                setintr = 1;
 #ifdef TELL
        settell();
                setintr = 1;
 #ifdef TELL
        settell();
@@ -312,6 +312,8 @@ notty:
                        }
                }
        }
                        }
                }
        }
+       if (setintr == 0 && parintr == SIG_DFL)
+               setintr++;
        sigset(SIGCHLD, pchild);                /* while signals not ready */
 
        /*
        sigset(SIGCHLD, pchild);                /* while signals not ready */
 
        /*