Date: Thu, 26 Sep 2002 22:10:03 -0700 (PDT) From: pan qingfeng <panqingfengtebie@yahoo.com> To: freebsd-bugs@FreeBSD.org Subject: Re: misc/42943: fd 0,1,2 should not be set to nonblock in _thread_fd_table_init() Message-ID: <200209270510.g8R5A3lw064446@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/42943; it has been noted by GNATS. From: pan qingfeng <panqingfengtebie@yahoo.com> To: bug-followup@FreeBSD.org Cc: Subject: Re: misc/42943: fd 0,1,2 should not be set to nonblock in _thread_fd_table_init() Date: Thu, 26 Sep 2002 22:02:11 -0700 (PDT) --0-818482201-1033102931=:34032 Content-Type: text/plain; charset=us-ascii Buf BOTH of the parent process and child process DO NOT call fcntl() to change the fd state, after praent fork() and exec() the muti-thread process, the parent process found fd 0 is now nonblock... So, can i assume that: After fork() and exec() a muti-thread process, than you have to check your fd 0, fd 1, fd 2 for blocking in parent process? I don't think it's a standard behavior of exec(), all other pthread lib do not do this. I think the child process should use the file state what they inherit but not force to set it to be nonblock, at least this behavior including in the doc of exec()... --------------------------------- Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! --0-818482201-1033102931=:34032 Content-Type: text/html; charset=us-ascii Buf BOTH of the parent process and child process DO NOT call fcntl() to change the fd state,<BR>after praent fork() and exec() the muti-thread process, the parent process found fd 0 is now<BR>nonblock...<BR>So, can i assume that: After fork() and exec() a muti-thread process, than you have to <BR>check your fd 0, fd 1, fd 2 for blocking in parent process? I don't think it's a standard<BR>behavior of exec(), all other pthread lib do not do this.<BR>I think the child process should use the file state what th ey inherit but not force to set it to be nonblock,<BR>at least this behavior including in the doc of exec()...<p><br><hr size=1>Do you Yahoo!?<br> New <a href="http://rd.yahoo.com/evt=1207/*http://sbc.yahoo.com/">DSL Internet Access</a> from SBC & Yahoo!</a> --0-818482201-1033102931=:34032-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209270510.g8R5A3lw064446>