NEEDED asymmetrical close for pipes/sockets 
Author Message
 NEEDED asymmetrical close for pipes/sockets

In Tcl, there are already two cases of bidirectional channels: sockets
and "r+" pipes. Both are OK, but in many cases you want to close the
write side (which sends an EOF to the input of the program/server), and
wait for what the program/server wants to say as a goodbye. But the Tcl
"close" command shuts both of them simultaneously.

The two situations are in fact slighly different:
- For pipes, there are actually two descriptors at the low level, so
it's not a big deal to keep them separate internally, in order to
implement the "half-close".
- For sockets, there is just one intrinsically bidirectional descriptor,
hence the shutdown() call. But since "shutdown()" is available with all
socket implementations, there's no problem either.

Suggestion for syntax: close [-r|-w] <channel>

Reactions ?


Fri, 11 Aug 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. pipe.close -> Broken pipe/DRb madness

2. VW/Sockets (detecting abnormally closed socket)

3. Closing output pipes

4. win32: Pipes opened with popen3 cant be closed!

5. closing pipes: error status

6. Unable to close pipe

7. New pipe [close] logic on windows available -- please test

8. close $pipe doesn't return non-zero exit status

9. Closing pipes

10. Closing a Unix Pipe

11. closing pipe hang

12. ExpectNT BUG: close pipe, child doesn't get EOF


Powered by phpBB® Forum Software