Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site allegra.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!allegra!mp From: mp@allegra.UUCP (Mark Plotnick) Newsgroups: net.bugs.4bsd Subject: remote processes started with rsh can be killed unintentionally Message-ID: <4831@allegra.UUCP> Date: Mon, 29-Jul-85 16:34:15 EDT Article-I.D.: allegra.4831 Posted: Mon Jul 29 16:34:15 1985 Date-Received: Wed, 31-Jul-85 03:42:32 EDT Organization: AT&T Bell Laboratories, Murray Hill Lines: 44 ... Description: rsh will catch interrupt, quit, and soft kill signals, and propagate them to the remote process, even if those signals were being ignored, for example by having started the rsh in the background or with nohup. This is only a problem for /bin/sh users, since it doesn't place children in different process groups as the csh does. Repeat-By: $ rsh presto "troff big-job" & $ [ at this point if you type ^C, the troff will be interrupted ] Fix: *** /tmp/rsh.c.old --- /tmp/rsh.c *************** *** 127,135 } (void) setuid(getuid()); omask = sigblock(mask(SIGINT)|mask(SIGQUIT)|mask(SIGTERM)); ! signal(SIGINT, sendsig); ! signal(SIGQUIT, sendsig); ! signal(SIGTERM, sendsig); pid = fork(); if (pid < 0) { perror("fork"); --- 127,138 ----- } (void) setuid(getuid()); omask = sigblock(mask(SIGINT)|mask(SIGQUIT)|mask(SIGTERM)); ! if(signal(SIGINT,SIG_IGN)!=SIG_IGN) ! signal(SIGINT, sendsig); ! if(signal(SIGQUIT,SIG_IGN)!=SIG_IGN) ! signal(SIGQUIT, sendsig); ! if(signal(SIGTERM,SIG_IGN)!=SIG_IGN) ! signal(SIGTERM, sendsig); pid = fork(); if (pid < 0) { perror("fork"); Mark Plotnick allegra!mp