Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Oct 2002 14:16:56 -0400 (EDT)
From:      Garrett Wollman <wollman@lcs.mit.edu>
To:        jmallett@FreeBSD.ORG
Cc:        arch@FreeBSD.ORG, mike@FreeBSD.ORG
Subject:   Re: [jmallett@FreeBSD.org: [PATCH] Reliable signal queues, etc., [for review]]
Message-ID:  <200210051816.g95IGu7K026880@khavrinen.lcs.mit.edu>
In-Reply-To: <20021005002021.A14635@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <20021005002021.A14635@FreeBSD.org> you write:

>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.

This is one of the reasons why I much prefer to keep the existing
signal-pending bitmaps.  It should *always* be possible to deliver a
(non-real-time) signal to a process; it is legitimate that the
delivery of additional information may fail due to a lack of
resources.  This also makes it possible to optimize the common case of
an application which has not requested RTS behavior for the signal it
is receiving.  Obviously, SIGSTOP and SIGKILL can never have RTS
behavior since they cannot be caught.  Since there are special
delivery rules for both of them (see POSIX once again) they need to be
special-cased anyway.  (Likewise SIGCONT, although it is at least
conceivable that an application might want extended information for
SIGCONT, though Tana only knows what they'd do with it.)

>The most notable change is that the most recently sent && lowest
>numbered signal is sent, in the normal course of events, rather than
>simply the lowest numbered or most recently sent.

This still isn't right.  Real-time signals are QUEUED -- i.e., signals
of the same species are delivered in FIFO, not LIFO, order.  POSIX
further specifies that signal N will be delivered before signal N+k,
for SIGRTMIN <= N <= N+k <= SIGRTMAX.  The relative delivery order of
any signals outside of this range is unspecified beyond the special
behavior of SIGCONT, SIGSTOP, and SIGKILL.

Please read section 2.4 of the System Interfaces volume of IEEE
Std.1003.1-2001 very carefully before proceeding.  If you do not have
a copy of the standard, I think Mike Barcroft still has a few copies
of The Open Group's ``authorized guidebook'' which includes a CD-ROM
of the full standard.

-GAWollman

-- 
Garrett A. Wollman   | [G]enes make enzymes, and enzymes control the rates of
wollman@lcs.mit.edu  | chemical processes.  Genes do not make ``novelty-
Opinions not those of| seeking'' or any other complex and overt behavior.
MIT, LCS, CRS, or NSA|         - Stephen Jay Gould (1941-2002)

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?200210051816.g95IGu7K026880>