public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/749] New: sigaction() and signal() misbehave
@ 2005-02-17 14:52 sebastien dot decugis at ext dot bull dot net
  2005-02-17 14:54 ` [Bug libc/749] " sebastien dot decugis at ext dot bull dot net
  2005-02-17 23:34 ` roland at gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: sebastien dot decugis at ext dot bull dot net @ 2005-02-17 14:52 UTC (permalink / raw)
  To: glibc-bugs

The Single Unix Specification requires that a signal handler set with signal()
can be saved then restored with sigaction. Using this feature results in the
signal not being caught.

-- 
           Summary: sigaction() and signal() misbehave
           Product: glibc
           Version: 2.3.4
            Status: NEW
          Severity: normal
          Priority: P3
         Component: libc
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: sebastien dot decugis at ext dot bull dot net
                CC: glibc-bugs at sources dot redhat dot com


http://sources.redhat.com/bugzilla/show_bug.cgi?id=749

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/749] sigaction() and signal() misbehave
  2005-02-17 14:52 [Bug libc/749] New: sigaction() and signal() misbehave sebastien dot decugis at ext dot bull dot net
@ 2005-02-17 14:54 ` sebastien dot decugis at ext dot bull dot net
  2005-02-17 23:34 ` roland at gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: sebastien dot decugis at ext dot bull dot net @ 2005-02-17 14:54 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From sebastien dot decugis at ext dot bull dot net  2005-02-17 14:53 -------
Created an attachment (id=411)
 --> (http://sources.redhat.com/bugzilla/attachment.cgi?id=411&action=view)
testcase for this bug

This file demonstrate the bug.

-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=749

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/749] sigaction() and signal() misbehave
  2005-02-17 14:52 [Bug libc/749] New: sigaction() and signal() misbehave sebastien dot decugis at ext dot bull dot net
  2005-02-17 14:54 ` [Bug libc/749] " sebastien dot decugis at ext dot bull dot net
@ 2005-02-17 23:34 ` roland at gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: roland at gnu dot org @ 2005-02-17 23:34 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From roland at gnu dot org  2005-02-17 23:33 -------
POSIX says that it's implementation-defined whether delivery of a signal whose
handler was set with `signal' has the effect of signal(signo, SIG_DFL) before
running the handler, or not.  Resetting the handler is the traditional SYSV
behavior of `signal', and not resetting it is the traditional BSD behavior.
In glibc, you get the SYSV style when you use some feature macros like
_POSIX_C_SOURCE, but don't also use _BSD_SOURCE or _GNU_SOURCE.  If you use
_GNU_SOURCE or you do not define any _*_SOURCE macros at all, then you will get
the BSD behavior.  The function `bsd_signal' is available if you use
_XOPEN_SOURCE or _GNU_SOURCE; this is the `signal' that does not reset the
handler, which `signal' gets you under _GNU_SOURCE.  Since your test program
defines _POSIX_C_SOURCE, it gets the sysv_signal flavor instead.  The only way
to be POSIX-compliant here is not to rely on `signal' one way or the other, and
instead stick to using `sigaction'.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


http://sources.redhat.com/bugzilla/show_bug.cgi?id=749

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-02-17 23:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-17 14:52 [Bug libc/749] New: sigaction() and signal() misbehave sebastien dot decugis at ext dot bull dot net
2005-02-17 14:54 ` [Bug libc/749] " sebastien dot decugis at ext dot bull dot net
2005-02-17 23:34 ` roland at gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).