mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jamie Lokier <lk@tantalophile.demon.co.uk>
To: Dan Kegel <dank@kegel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: A signal fairy tale
Date: Wed, 27 Jun 2001 11:18:28 +0200	[thread overview]
Message-ID: <20010627111827.A22744@pcep-jamie.cern.ch> (raw)
In-Reply-To: <3B38860D.8E07353D@kegel.com>
In-Reply-To: <3B38860D.8E07353D@kegel.com>; from dank@kegel.com on Tue, Jun 26, 2001 at 05:54:37AM -0700

Dan Kegel wrote:
>        That signal is no longer delivered normally or available for
>        pickup with sigwait() et al.  Instead, it must be picked up by
>        calling read() on the file descriptor returned by sigwait();
>        the buffer passed to read() must have a size which is a
>        multiple of sizeof(siginfo_t).

Does this mean that the read() call must write sizeof(siginfo_t) bytes
for each signal delivered?

At the moment, the kernel does not have to write the whole siginfo_t
structure to userspace -- it can write just those fields which are
relevant for a particular signal.

>        A signal number cannot be opened more than once concurrently;
>        sigopen() thus provides a way to avoid signal usage clashes in
>        large programs.

sigopen() won't prevent signal usage clashes if the other user is using
sigaction() and sigtimedwait(), or will it?

Btw, this functionality is already available using sigaction().  Just
search for a signal whose handler is SIG_DFL.  If you then block that
signal before changing, checking the result, and unblocking the signal,
you can avoid race conditions too.  (This is what my programs do).

-- Jamie

  parent reply	other threads:[~2001-06-27  9:19 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-26 12:54 Dan Kegel
2001-06-27  3:56 ` Christopher Smith
2001-06-27  6:21 ` Balbir Singh
2001-06-27 18:11   ` Christopher Smith
2001-06-28  3:28     ` Balbir Singh
2001-06-27  9:18 ` Jamie Lokier [this message]
2001-06-27 18:16   ` Christopher Smith
2001-06-28 12:58 ` John Fremlin
2001-06-28 16:21   ` Jamie Lokier
2001-06-29  8:22 ` Christopher Smith
2001-06-29 11:47   ` John Fremlin
2001-06-28  2:49 Daniel R. Kegel
2001-06-29  8:18 ` Christopher Smith
2001-06-29  9:05   ` Dan Kegel
2001-06-28  2:57 Daniel R. Kegel
2001-06-29  8:19 ` Christopher Smith
2001-06-29  9:29   ` Dan Kegel
2001-06-29 18:46     ` Dan Kegel
2001-07-02 22:33       ` Christopher Smith
2001-06-28  3:04 Daniel R. Kegel
2001-06-28 14:46 ` Jamie Lokier
2001-06-28 20:11 Daniel R. Kegel
2001-06-29  8:31 ` Christopher Smith
     [not found] <fa.d69j5vv.ej8irj@ifi.uio.no>
     [not found] ` <fa.h2rpibv.87m5bp@ifi.uio.no>
2001-06-28 14:59   ` Dan Maas
2001-06-28 15:21     ` Alan Cox
2001-06-29  8:26   ` Christopher Smith
2001-06-29 11:56     ` Chris Wedgwood
2001-06-30 10:02     ` Jan Hudec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010627111827.A22744@pcep-jamie.cern.ch \
    --to=lk@tantalophile.demon.co.uk \
    --cc=dank@kegel.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®