Date: Wed, 18 Sep 2002 21:50:03 -0700 (PDT) From: Gregory Bond <gnb@itga.com.au> 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: <200209190450.g8J4o3Io001467@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: Gregory Bond <gnb@itga.com.au> To: pqf <pqf@163.net> Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: misc/42943: fd 0,1,2 should not be set to nonblock in _thread_fd_table_init() Date: Thu, 19 Sep 2002 14:40:34 +1000 > parend process call dup2() to make fd 0 be a unix domain socket > parent process fork() muti-thread(pthread) child process > child process set fd 0 to nonblock in _thread_fd_table_init() > fd 0 is shared between parent process and child process, so the parent proces > s's fd 0 is now nonblock, but the parent process DO NOT know what happen beca > use it DID NOT do anything to fd 0... I would argue this is a bug in the (parent) program - if you are going to share file descriptors, you'd better make sure you understand what the other program is going to do to them! 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?200209190450.g8J4o3Io001467>