Date: Tue, 16 Nov 2004 19:50:32 +0200 From: Kirill Mukhoyarov <admin@btobits.com> To: freebsd-questions@freebsd.org Subject: select call freeze Message-ID: <1010077207.20041116195032@btobits.com>
next in thread | raw e-mail | index | archive | help
Hi all ! Problem introduction: 1) FreeBSD 4.10-Stable 1) 2 file descriptors obtained from pipe() call [fd1,fd2] 2) 2 threads Problem description: One thread is receiver, after starting it do some user level tasks and call select with fds operate with fd1. fd_set fds; FD_ZERO(&fds); FD_SET(fd1, &fds); select(FD_SETSIZE,&fds,NULL,NULL,NULL); Another thread is sender, it do some user level operations, after that call write with fd2 as argument. write(fd2,(char*)buf,bufLen); Select from first thread did not return control at all. If process receive SIGINT - select unfreeze. Signal handlers are not redefined. P.S. This problem found in shbuftest program - part of ports/devel/libshbuf-0.0.2_1 port. _____________________________________________________________ Kirill I. Mukhoyarov B2B ITS Corp. +380 44 4173322 http://b2bits.com admin+AT+btobits.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1010077207.20041116195032>