Onintr would reset SIGINT if found in /etc/csh.{cshrc,login}
authorChristos Zoulas <christos@ucbvax.Berkeley.EDU>
Tue, 5 Nov 1991 10:21:55 +0000 (02:21 -0800)
committerChristos Zoulas <christos@ucbvax.Berkeley.EDU>
Tue, 5 Nov 1991 10:21:55 +0000 (02:21 -0800)
SCCS-vsn: bin/csh/csh.c 5.32

usr/src/bin/csh/csh.c

index 991eb90..a937445 100644 (file)
@@ -12,7 +12,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)csh.c      5.31 (Berkeley) %G%";
+static char sccsid[] = "@(#)csh.c      5.32 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -476,9 +476,11 @@ notty:
        /* Will have value(STRhome) here because set fast if don't */
        {
            int     osetintr = setintr;
        /* Will have value(STRhome) here because set fast if don't */
        {
            int     osetintr = setintr;
+           sig_t   oparintr = parintr;
            sigset_t omask = sigblock(sigmask(SIGINT));
 
            setintr = 0;
            sigset_t omask = sigblock(sigmask(SIGINT));
 
            setintr = 0;
+           parintr = SIG_IGN;  /* Disable onintr */
 #ifdef _PATH_DOTCSHRC
            (void) srcfile(_PATH_DOTCSHRC, 0, 0);
 #endif
 #ifdef _PATH_DOTCSHRC
            (void) srcfile(_PATH_DOTCSHRC, 0, 0);
 #endif
@@ -490,6 +492,7 @@ notty:
 #endif
            (void) sigsetmask(omask);
            setintr = osetintr;
 #endif
            (void) sigsetmask(omask);
            setintr = osetintr;
+           parintr = oparintr;
        }
        (void) srccat(value(STRhome), STRsldotcshrc);
 
        }
        (void) srccat(value(STRhome), STRsldotcshrc);