This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] driver: ignore SIGINT while waiting on subprocesses to finish
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Patrick Palka <patrick at parcs dot ath dot cx>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 17 Nov 2014 16:49:33 +0000
- Subject: Re: [PATCH] driver: ignore SIGINT while waiting on subprocesses to finish
- Authentication-results: sourceware.org; auth=none
- References: <1416099712-15891-1-git-send-email-patrick at parcs dot ath dot cx>
On Sat, 15 Nov 2014, Patrick Palka wrote:
> 1. if the top-level driver is waiting on a hanging subprocess,
> pressing ^C will kill the driver but it may not necessarily kill the
> subprocess; an unresponsive, perhaps busy-looping subprocess may be
> running in the background yet the compiler will seem to have to
> terminated successfully.
The subprocess should be in the same process group as the driver, so ^C
should send SIGINT to both processes. Is your concern about ^C being
pressed at exactly the time when collect2 or lto-wrapper has just called
signal (SIGINT, SIG_IGN) in order to find out whether SIGINT was already
set to SIG_IGN? If so, the right way to avoid that short period of time
when signals are ignored but shouldn't be would I think be to use
sigaction to query the existing handler without changing it, when
sigaction is available.
--
Joseph S. Myers
joseph@codesourcery.com