Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Oct 2002 19:16:34 -0700 (PDT)
From:      Don Lewis <dl-freebsd@catspoiler.org>
To:        jmallett@FreeBSD.ORG
Cc:        arch@FreeBSD.ORG
Subject:   Re: [jmallett@FreeBSD.org: [PATCH] Reliable signal queues, etc., [for review]]
Message-ID:  <200210090216.g992GYvU037201@gw.catspoiler.org>
In-Reply-To: <20021005002021.A14635@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On  5 Oct, Juli Mallett wrote:
> To
> accomodate situations where allocation of a 'ksiginfo' is a failure
> mode (no memory), the destination process is told to exit via a new
> member of 'struct proc', p_suicide, which tells a process to kill itself
> next time it goes through userret.  It is done this way to prevent a
> recursive failure case, and to prevent possibly dying with extraneous
> locks held, as signals are sent from odd places of the kernel.

Another problem with p_suicide is that the process exit status will be
incorrect.  If the process dies because of the receipt of a signal, the
exit status should contain the signal number.

I like Garrett's suggestion of keeping the bitmap.  There's no sense in
queuing up information for any signals that will terminate the process
before it can retrieve the additional information, whether the signal is
uncatchable like SIGKILL, or because the process has not supplied a
handler and the default action is to terminate the process.  That will
prevent kernel memory from being uselessly consumed by a user leaning on
^c in an attempt to kill a process stuck in an uninterruptable wait.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210090216.g992GYvU037201>