Can close-ing a pipe trigger a SIGPIPE?

Mikhail T. mi+thun at aldan.algebra.com
Sat Oct 17 17:58:59 UTC 2009


Jilles Tjoelker написав(ла):
> It seems unwise to assume that a write(2) of 0 bytes is a noop.
> Even if it is, doing it is a waste of a system call.
This is not my code -- it is part of the implementation of Tcl's 
"close" command. I'm trying to unravel, where this write coming from,
but, meanwhile, it would be useful to find out, if FreeBSD's handling of
such writes changed recently, wouldn't it?

Because this self-test used to pass cleanly before, so either FreeBSD
changed, or the Tcl did (not the TclX extension, which did not change in
years). Thanks for your help...

    -mi



More information about the freebsd-stable mailing list