Autor: Mark Hindley Data: Dla: Jesse Smith CC: David Kuehling, 227 Temat: [devuan-dev] bug#227: nbd-client: At shutdown nbd-client disabled
before file-systems could be cleanly unmounted
On Thu, Feb 16, 2023 at 11:54:32AM -0400, Jesse Smith wrote: > I see two possible ways we could fix this:
>
> 1. Create a command line flag which disables the SIGSTOP and SIGCONT
> signals being sent. This is an easy fix, quick and dirty. The potential
> downside is if someone disables the STOP signal then maybe processes
> terminate, move groups, or are replaced before we get around to sending
> them the KILL signal. This probably won't happen, but it means killall5
> is working with a "moving target".
>
> 2. We can run SIGSTOP on all processes _except_ those in the omit list.
> This will be a lot slower than the existing "kill(-1, SIGSTOP)" call we
> currently make. But I think it's more correct.
>
> Basically the new work flow would look like this:
>
> 1. Send all processes except those omitted the SIGSTOP command.
> 2. Send all processes except those omitted the SIGKILL command.
> 3. Send all processes except those omitted the SIGCONT command.
>
> Option #2 is slow and ugly, but seems "correct" from a behaviour point
> of view.
I don't really like #1: it will mean patching callers to get the (more?) correct
behaviour. So #2 seems better. Will it be significantly slower?. You could only
use it when omitpid is specified? If there are no omitpids, the current
behaviour seems fine.