Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a5boml1m.fsf@mid.deneb.enyo.de>
Date: Sat, 18 Jan 2025 12:13:57 +0100
From: Florian Weimer <fw@...eb.enyo.de>
To: Rich Felker <dalias@...c.org>
Cc: musl@...ts.openwall.com,  Askar Safin <safinaskar@...omail.com>
Subject: Re: [bug] Ctrl-Z when process is doing posix_spawn makes the
 process hard to kill

* Rich Felker:

> On Sat, Jan 18, 2025 at 10:51:01AM +0100, Florian Weimer wrote:
>> * Askar Safin:
>> 
>> > Thanks a lot for answer!
>> >
>> >  ---- On Fri, 17 Jan 2025 10:37:09 +0400  Rich Felker  wrote --- 
>> >  > Note that SIGSTOP, which is not blockable interceptible or ignorable,
>> >  > can't be handled this way, but the pid has not yet leaked to anything
>> >  > at this point, so the only way SIGSTOP can be generated is by a badly
>> >  > behaved program signaling random pids, which is not a case that needs
>> >  > to be handled gracefully.
>> >
>> > But what if somebody sends SIGSTOP to whole process group using kill(2)?
>> 
>> I would expect that they send SIGCONT afterwards to the same process
>> group, to resume execution of all processes.  Doesn't this avoid the
>> issue?
>
> I mean if you just want a heuristic fix.. I guess?
>
> But certainly they could send SIGSTOP to the group then SIGCONT only
> to the single known process.

It seems this may be the hard-to-kill scenario with SIGTSTP, too.
After the problematic ^Z, the desired signal is only delivered after
typing “fg” or equivalent in the shell, which triggers that SIGCONT.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.