|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0329 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 0329.
Report 0329 Actions
Problem Report Number 0329 Submitter's Classification Specification problem State Resolved Resolution Permanent Interpretation (PIN) Problem Resolution ID PIN.X.0045 Raised 1994-10-11 08:00 Updated 2003-03-13 08:00 Published 1994-10-27 08:00 Product Standard Internationalised System Calls and Libraries (XPG4) Certification Program The Open Brand certification program Test Suite VSX4 version 4.3.4 Test Identification ANSI.os/genuts/system_X 50, 51, 59 Specification System Interfaces and Headers Issue 4 Location in Spec See Problem Text Problem Summary PIN4.045 These testcases make one crucial assumption that cannot be expected to work on every platform. The assumption is that a SIGALRM signal will be delivered to the parent in the middle of a system() funct... Problem Text
These testcases make one crucial assumption that cannot be expected to
work on every platform. The assumption is that a SIGALRM signal will
be delivered to the parent in the middle of a system() function call.
Our implementation blocks all blockable signals during the a call to
the system() function so a SIGALRM signal will not arrive until after
the command being executed has completed. In these tests, the SIGALRM
signal handlers verify that:
- (test 50) SIGINT and SIGCONT are ignored - they do not appear
to be ignored because the system() function has already
restored their actions.
- (test 51) SIGCHLD is blocked - it does not appear to be
blocked because the system() function has already restored
the signal mask
- (test 59) system() returns an error if the handler does the wait()
for the child before the system() function has the chance to do
so - the signal handler receives an ECHILD error because the
system() function already performed the wait()
Since a SIGALRM handler has no chance to gain control until after the
wait() completes for the system() function, these tests cannot be
expected to work.Test Output
************************************************************************
/tset/ANSI.os/genuts/system_X/T.system_X 50 Failed
Test Description:
When a SIGINT or SIGQUIT signal is raised for a process during the
execution of a call to system(), (while system() is awaiting a
termination status from the command interpreter) then the SIGINT or
SIGQUIT signal is ignored.
Not tested in XPG3 mode.
Test Strategy:
CREATE a child process.
SETUP signal catcher for SIGALRM
SET alarm time to 5 seconds
CALL system(cmd), where command executes a sleep()
SIGNAL catcher will
EXAMINE signal settings using sigaction()
VERIFY that SIGINT and SIGQUIT were set to be ignored
Test Information:
system() did not ignore SIGINT
system() did not ignore SIGQUIT
************************************************************************
/tset/ANSI.os/genuts/system_X/T.system_X 51 Failed
Test Description:
When a call to system() is awaiting a termination status from the
command interpreter, then it blocks the SIGCHLD signal.
Not tested in XPG3 mode.
Test Strategy:
CREATE a child process.
SETUP signal catcher for SIGALRM
SET alarm time to 5 seconds
CALL system(cmd), where command executes a sleep()
SIGNAL catcher will
EXAMINE signal mask using sigprocmask()
VERIFY that SIGCHLD was blocked using sigismember()
Test Information:
system() did not block SIGCHLD
************************************************************************
/tset/ANSI.os/genuts/system_X/T.system_X 59 Unresolved
Test Description:
When the termination status for the command language interpreter
cannot be obtained, then a call to system() returns -1 and sets errno
to indicate the error.
Not tested in XPG3 mode.
Test Information:
wait() failed - errno 115 (ECHILD)Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
The XPG states that during the call to the system() function the SIGINT
and SIGQUIT signals are ignored and the SIGCHLD signal is blocked. There
is no mention of changes to the disposition of other signals and it could
be considered that the specification allows these signals to be blocked on
entry to any call as long as they are unblocked before the call returns.
An alternative reading of the specification of system() is that it only
allows the changes to the signal disposition as stated in the description.
I believe that the first of these alternatives is the correct interpretation
and that a permanent interpretation should be granted.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Permanent Interpretation (PIN) Review Conclusion
A Permanent Interpretation is granted.
Problem Reporting System Options:
- View Report 0329
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority