-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Michael Burk wrote the following lines on 09/10/2009 06:58 PM: > If pthreads is the issue, then I have two questions: > 1) is the behavior of changing stdio to non_blocking when using pthreads > unique to OpenBSD? > 2) why would this call fix the problem: > fcntl(datafd, F_GETFL, 0); > does that have other side effects? > > Thanks, > Michael
Is guess it is the same as for older versions of FreeBSD, I googled link: http://lists.freebsd.org/pipermail/freebsd-bugs/2003-May/000615.html I assume the same thing applies to OpenBSD: The threading takes place in userspace in OpenBSD and the kernel does not know anything about threads. When doing a blocking read in a threaded application, all threads would be blocked since the only thing the kernel knows about is the process. ... > list discussing this problem: > >http://archives.zmanda.com/amanda-archives/viewtopic.php?t=4763&sid=f86451987866cfccc9fe363fe7546a7b If I got it correctly the clients only have one thread, so then I guess you could do: fcntl(datafd, F_GETFL, 0); without getting any side effects. But on the other hand that is an ugly work around, and ugly work arounds tends to cause other problems in the future. So I say get rid of the pthreads dependency since the clients are single threaded anyway. br Hekan Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFKqTVLfu+aNIkyxzsRAuzuAJ4wP4qsamRwxoNGqW4EhJyz8AAuFACeLE7Y l4Q1AvYMn3Uh/nMELi/gRTs= =88yz -----END PGP SIGNATURE-----