select system call queries

2 views
Skip to first unread message

arnab

unread,
Aug 13, 2008, 6:24:14 AM8/13/08
to Linux Experts Group - LEG
Hi All,
I have the following code snippet.
pthread_mutex_lock()
select()-> for read file descriptors with timeout of 25 sec
accept()
pthread_mutex_release()

I removed the locks of pthread_mutex_lock/and release as socket
libraries are thread safe.
Now my question is there a possibility of hang in the select function
when read file descriptors are not available?Also can the timeout of
25 sec contribute to the hang?
How can I check the read_fds are not available or the threshold is
being reached.
Any comments or suggestions would be very much appreciated.
Thanks
Arnab
Reply all
Reply to author
Forward
0 new messages