From owner-freebsd-bugs Thu Sep 26 22:10: 4 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B3CC537B401 for ; Thu, 26 Sep 2002 22:10:03 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66C1643E77 for ; Thu, 26 Sep 2002 22:10:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g8R5A3Co064448 for ; Thu, 26 Sep 2002 22:10:03 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g8R5A3lw064446; Thu, 26 Sep 2002 22:10:03 -0700 (PDT) Date: Thu, 26 Sep 2002 22:10:03 -0700 (PDT) Message-Id: <200209270510.g8R5A3lw064446@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: pan qingfeng Subject: Re: misc/42943: fd 0,1,2 should not be set to nonblock in _thread_fd_table_init() Reply-To: pan qingfeng Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR misc/42943; it has been noted by GNATS. From: pan qingfeng 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,
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 th ey 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-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message