Problem Report Number |
1616 |
Submitter's Classification |
Specification problem |
State |
Resolved |
Resolution |
Permanent Interpretation (PIN) |
Problem Resolution ID |
PIN.X.0173 |
Raised |
1996-08-14 08:00 |
Updated |
2003-03-13 08:00 |
Published |
1996-11-17 08:00 |
Product Standard |
Internationalised System Calls and Libraries Extended (UNIX 95) |
Certification Program |
The Open Brand certification program |
Test Suite |
VSU version 4.1.0 |
Test Identification |
CAPI.os/files/unlink 2 |
Specification |
System Interfaces and Libraries Issue 4 Version 2 |
Location in Spec |
See Problem Text |
Problem Summary |
PIN4U.00039 This request seeks a permanent interpretation for implementations that follow historical practice |
Problem Text |
Although these tests are testing to the XSH4v2 specification as currently worded, we believe the specification is in error in making the following statement:
The unlink() function will fail if:
[EBUSY] The file named by the path argument cannot be unlinked because it is being used by the system or another process and the implementation considers this an error, or the file named by path is a named STREAM.
In the case of STREAMS pipes, the conventional method is to remove (or unlink()) the device from the filesystem. Without unlink(), there is no defined method for removing named STREAMS created by mkfifo(). In other cases of named STREAMS, the easiest and most common method for cleanup is to unlink() the pathname.
Allowing unlink() to support the removal of a named STREAM is consistent with historical SVR4 implementations. This allows the cleaning up of the filesystem of orphaned named STREAMS without requiring special programs to do so.
We believe the specification (and test suite) should allow both behaviors and as such the description for EBUSY should be changed to:
[EBUSY] The file named by the path argument cannot be unlinked because it is being used by the system or another process and the implementation considers this an error, or the file named by path is a named STREAM and the implementation considers this an error.
|
Test Output |
TEST CASE: unlink
TEST PURPOSE #2 EBUSY in errno, return -1, and not unlink the file on a call to int unlink(const char *path) when the file named by path is a named STREAM. PREP: Create a regular file PREP: Get configured VSU_STREAM_DEV device name PREP: Open a streams device and associate a pathname with it TEST: unlink(path) when path refers to a named STREAM returns -1 ERROR: The call to unlink() did not return the correct value Expected: -1 Received: 0 2 FAIL
|