NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/51556: less(1) generates SIGTTOU if lacking a controlling terminal
The following reply was made to PR bin/51556; it has been noted by GNATS.
From: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: bin/51556: less(1) generates SIGTTOU if lacking a controlling terminal
Date: Thu, 13 Oct 2016 05:23:09 +0000 (UTC)
mrg%eterna.com.au@localhost (matthew green) writes:
>i'd not be so worried about the less bug, but for me i can't
>^C out of it. ^Z does work, but having a shell i can't sent
>an interrupt to is pretty serious situation i'd like to avoid
>having happen if the tools can.
As the background process is already stopped by SIGTTOU, a SIGTERM won't
do much until the process gets a SIGCONT. A shell with job control support
does this, but timeout does not.
E.g. csh:
if (kill(-pp->p_jobid, signum) < 0) {
(void)fprintf(csherr, "%s: %s\n", vis_str(cp),
strerror(errno));
err1++;
}
if (signum == SIGTERM || signum == SIGHUP)
(void)kill(-pp->p_jobid, SIGCONT);
but timeout:
if (!foreground)
killpg(pgid, killsig);
else
kill(pid, (int)sig_term);
if (do_second_kill) {
set_interval(second_kill);
second_kill = 0;
sig_ign = killsig;
killsig = SIGKILL;
} else
break;
--
--
Michael van Elst
Internet: mlelstv%serpens.de@localhost
"A potential Snark may lurk in every tree."
Home |
Main Index |
Thread Index |
Old Index