lkml.org 
[lkml]   [2003]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectread() & close()
Date
Hello All!

[ CC me please - I'm not subscribed ]

I have a question which goes to 2.2 kernels times.
But I expect newer kernels do the same.

I have/had a simple issue with multi-threaded programs:

one thread is doing blocking read(fd) or poll({fd}) on
file/socket.
another thread is doing close(fd).

I expected first thread will unblock with some kind
of error - but nope! It is blocked!

Is it expected behaviour?

I was implementing couple of char device
drivers and I was putting wake_up_interruptible()
into close(). Nice feature - but not more.

Does it really matters?
What standards do say about this? - I have none of
them :-(

P. S. Subject looks correct from point of view of bash:
"read() &" and then "close()" does nothing - %1 can only
be killed ;)

--- Regards&Wishes! With respect
--- Ihar "Philips" Filipau and Phil for friends
- - - - - - - - - - - - - - - - - - - - - - - - -
MCS/Mathematician - System Programmer
Ihar Filipau
Software entwickler @ SUSS MicroTec Test Systems GmbH,
Suss-Strasse 1, D-01561 Sacka (bei Dresden)
e-mail: ifilipau@sussdd.de tel: +49-(0)-352-4073-327
fax: +49-(0)-352-4073-700 web: http://www.suss.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.107 / U:0.112 seconds]
©2003-2014 Jasper Spaans. Advertise on this site