![]() | |||||||||||||
Messages in this thread |
On Tue, 11 May 2004, Andre Ben Hamou wrote: > Eric Dumazet wrote: > > So please how do you guarantee that thread 1 runs *before* thread 2) > > > > Thread 1) > > select( fd) > > > > Thread 2) > > close(fd) > > > > Thats not possible. > > Some time ago I sent a patch for the select() systemcall to return if the last fd was closed. If select() specifies more than one fd, then staying in select is valid, but if there is no more fd left to wait on, select() should return I think. I don't know what standards say here or other Unix do in that case, so I did't have a good reason for the patch and it was ignored. The patch was for 2.4, but 2.6 is the same and poll() as well. Armin - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ | ||||||||||||
| Last update: 2005-03-22 13:03 [from the cache] ©2003-2008 | |||||||||||||