#1630 closed defect (fixed)

sigtimedwait not following POSIX spec

Reported by: Vinu Rajashekhar Owned by: Joel Sherrill
Priority: normal Milestone: 4.11
Component: score Version: 4.11
Severity: normal Keywords:
Cc: vinutheraj@… Blocked By:
Blocking:

Description

sigtimedwait function implementation is not following the POSIX spec - http://www.opengroup.org/onlinepubs/009695399/functions/sigwaitinfo.html.

Currently, sigtimedwait may be interrupted by a signal which is caught. The spec says that sigtimedwait will return the signal number, if it is part of the set given to it to check for signals. If it is not part of the set, it will return -1 and set errno to EINTR.

This is not what the current implementation does. Currently, if it is interrupted by any signal, that signal number is returned.

A patch is attached which remedies the file.

Attachments (2)

sigtimedwait.patch (1.6 KB) - added by Vinu Rajashekhar on Jul 26, 2010 at 11:04:59 AM.
patch for sigtimedwait.c
psignalchecksignal.patch (1.6 KB) - added by Vinu Rajashekhar on Jul 27, 2010 at 5:30:27 AM.
patch which saves and restores Thread_Wait_information

Download all attachments as: .zip

Change History (4)

Changed on Jul 26, 2010 at 11:04:59 AM by Vinu Rajashekhar

Attachment: sigtimedwait.patch added

patch for sigtimedwait.c

Changed on Jul 27, 2010 at 5:30:27 AM by Vinu Rajashekhar

Attachment: psignalchecksignal.patch added

patch which saves and restores Thread_Wait_information

comment:1 Changed on Jul 28, 2010 at 5:25:57 PM by Vinu Rajashekhar

Resolution: fixed
Status: newclosed

I have committed the code. Please close this if it looks OK on your side.

Thanks. Yes, I am closing this.

FQWIW if this introduced an area of code that is now untested (e.g. no
coverage), I will file another PR for that and assign it to you.

Sure. :)

comment:2 Changed on Nov 24, 2014 at 6:58:28 PM by Gedare Bloom

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

Note: See TracTickets for help on using tickets.