public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Albert Cahalan <albert@users.sf.net>
To: developer_linux@yahoo.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: Question about Linux signal handling
Date: 23 Feb 2003 17:29:00 -0500	[thread overview]
Message-ID: <1046039341.32116.34.camel@cube> (raw)

Tom Sanders writes:

> If I catch a signal (SIGUSR2) using "sigaction" call
> then is the signal handler replaced with default
> handling, if I don't install the signal handler again?

That depends on how you set sa_flags. Read the
sigaction man page.

> I remember that in UNIX "signal" system call default
> signal bahavior was to replace the signal handler with
> default after everytime signal was received?

Yes. This is the behavior of all SysV UNIX systems
and Linux kernels. Unfortunately, BSD got it wrong.
Worse, the glibc developers saw fit to ignore both
UNIX history and Linus. They implemented BSD behavior
by making signal() use the sigaction system call
instead of the signal system call. This of course
makes it harder to port apps from SysV UNIX systems
to Linux. Use sigaction() in all new code.





             reply	other threads:[~2003-02-23 22:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-23 22:29 Albert Cahalan [this message]
2003-02-23 23:43 ` Question about Linux signal handling Alan Cox
2003-02-23 23:04   ` Albert Cahalan
2003-02-24  0:20     ` Alan Cox
2003-02-24  0:01   ` Magnus Danielson
  -- strict thread matches above, loose matches on Subject: below --
2003-02-23  4:45 Tom Sanders
2003-02-23 16:30 ` Jesse Pollard

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=1046039341.32116.34.camel@cube \
    --to=albert@users.sf.net \
    --cc=developer_linux@yahoo.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