This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc - Is the C function select thread safe??


I have a very recent version of Cygwin (see cygcheck.out attached) and an test application (attached) which has been extracted from the SIPP application. 

What it does in a loop is

*         Creates a thread

*         	In the thread: Calls "select" to wait for just under 1 second the exits the thread

*         Waits for the thread to exit.


And every time it goes around the loop, according to windows task manager, it one more handle is being used. 

If the call to "select" is removed, and a sleep of 1 is put in the loop, then it doesn't leak handles.

Hence my question, is "select" thread safe?

Regards
Trefor Edwards 

Attachment: test.c
Description: test.c

Attachment: cygcheck.out
Description: cygcheck.out

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]