HomeAbout Us A-Z IndexSearch * Contact Us Register LoginPress Shop

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 2539 Details

Help Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges

This page provides all information on Problem Report 2539.


Report 2539 Actions


    Problem Report Number 2539
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0683
    Raised 2008-09-09 04:36
    Updated 2008-09-10 01:18
    Published 2008-09-10 01:18
    Product Standard Internationalised System Calls and Libraries Extended V3 (UNIX 03)
    Certification Program The Open Brand certification program
    Test Suite VSX4 version 4.6.9
    Test Identification ANSI.os/genuts/system_X 57
    Specification Base Definitions Issue 6
    Problem Summary system_X 57 environment does not contain a command processor
    Problem Text The standard for system() regarding return value says:

    "If some error prevents the command language interpreter from executing
    after the child process is created, the return value from system() shall
    be as if the command language interpreter had terminated using exit(127)
    or _exit(127)."

    However, it immediately goes on to state:

    "If a child process cannot be created, or if the termination status for
    the command language interpreter cannot be obtained, system() shall
    return -1 and set errno to indicate the error."

    Our implementation is behaving correctly. If there is any error, no
    child process is created. The error in this case is that the command
    processor to be executed does not exist because of the use of chroot()
    in the test case, so system() correctly returns -1 with errno set to ENOENT.
    Test Output **********************************************************************
    /tset/ANSI.os/genuts/system_X/T.system_X 57 Failed

    Test Description:
    When an error prevents the command language interpreter from
    executing
    after the child process is created, then the return value from a
    call
    to system is as if the command language interpreter had terminated
    using exit(127) or _exit(127).

    Test Strategy:
    PARENT process will
    CREATE a child process.
    CHILD process will
    CALL tet_exec() to execute test program
    TEST program will
    CHANGE root directory using chroot(".")
    CALL system(cmd), where cmd executes a sleep()
    VERIFY that return value was 127
    VERIFY that pclose() terminated using exit() or _exit()

    Test Information:
    WIFEXITED() was false for system() return value: -1

    ************************************************************************

    Review Information

    Review Type TSMA Review
    Start Date 2008-09-09 04:36
    Last Updated 2008-09-09 18:08
    Completed 2008-09-09 18:08
    Status Complete
    Review Recommendation Rejected (REJ)
    Review Response This implementation of system() is deciding not to fork because it has
    determined that the child would encounter an error. This is not the
    same thing as the condition stated in the standard "a child process
    cannot be created". The standard is clear that a return of -1 only
    occurs for this condition (with errno set as for fork()), and for the
    condition that the termination status for the command language
    interpreter cannot be obtained. In the latter case errno would be set
    to ECHILD, not ENOENT. The standard does not have a general "otherwise"
    clause for system() returning -1, as is common with other interfaces.

    Early detection of an error that would occur in the child is certainly a
    reasonable thing for an implementation to do. However, in so doing it
    must apply an "as if" policy in order to conform to the standard. I.e.
    applications must see the same return value and errno setting as if the
    fork had been done and the error had been detected in the child. In the
    situation under test, the error that would have been detected in the
    child is one which would have prevented the command language interpreter
    from executing, for which the standard requires system() to return a
    value that indicates an exit status of 127.

    The implementor should alter system() so that when this condition is
    detected it returns 127<<8 instead of -1 (assuming the implementation
    uses the traditional encoding for wait status).

    Review Type SA Review
    Start Date 2008-09-09 17:08
    Last Updated 2008-09-10 00:20
    Completed 2008-09-10 00:20
    Status Complete
    Review Resolution Rejected (REJ)
    Review Conclusion Given the precise wording of the standard the SA cannot concur with the
    submitters interpretation and assertion that the implementation conforms
    See the TSMA response. If the submitter still believes that the standard
    is incorrect or ambiguous in this area an appeal may be appropriate.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority