Hi,

I think since this commit:
--------
commit 7c721d31e4b7a0bdf6f803b8e7c38996bf60b59f
Author: Bernhard Reutner-Fischer <rep.dot....@gmail.com>
Date:   Sun Jan 29 17:48:54 2012 +0100

    tmpnam, tempnam are obsolete in SUSV4
    
    Signed-off-by: Bernhard Reutner-Fischer <rep.dot....@gmail.com>

---------

the test case is broken. mkstemp opens the temporary file, mktemp
does not.

Strace shows following issue:
socket(PF_FILE, SOCK_STREAM, 0)         = 3
getpid()                                = 12607
open("/tmp/tst-cancel4-socket-1-9PTGfr", O_RDWR|O_CREAT|O_EXCL, 0600) = 4
close(4)                                = 0
bind(3, {sa_family=AF_FILE, path="/tmp/tst-cancel4-socket-1-9PTGfr"}, 35) = -1 
EADDRINUSE
(Address already in use)
open("/tmp/tst-cancel4-socket-1-cHm3px", O_RDWR|O_CREAT|O_EXCL, 0600) = 4
close(4)                                = 0
bind(3, {sa_family=AF_FILE, path="/tmp/tst-cancel4-socket-1-cHm3px"}, 35) = -1 
EADDRINUSE
(Address already in use)

mkstemp() creates the file, and bind() returns EADDRINUSE, if the 
file already exists.

Return to mktemp usage as glibc does for this testcase?

best regards
 Waldemar

_______________________________________________
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to