Date: Wed, 25 Nov 1998 02:25:34 -0500 (EST) From: HighWind Software Information <info@highwind.com> To: current@FreeBSD.ORG Subject: close() can hang! Message-ID: <199811250725.CAA27686@highwind.com>
next in thread | raw e-mail | index | archive | help
Follow this: --- A libc_r linked program starts up, binds a TCP port, dup2()'s the socket to STDIN and execv()'s another libc_r linked program. The new libc_r linked program starts a thread that calls "accept()" on STDIN. Once that happens. If the new program calls "close()" STDIN, it hangs! All fd's are blocking fd's at the application level. --- This is bad. Since the new program can't "close()" STDIN, it is in deep trouble if it wants to dup2() something else to STDIN! I have a test case that illustrates this and it is repeatable. I can provide it. However, I suspect this is a logic issue and somebody who understands the STDIN vs exec vs dup2 vs accept issues better than I can probably just pinpoint what is going on. Any ideas here? -Rob To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811250725.CAA27686>