2008/5/20 Bart Smaalders <[EMAIL PROTECTED]>: > [EMAIL PROTECTED] wrote: >> >> Hi Shawn, >> Is this wad complete? >> >> I took a look at the src/modules/client directory and there are a bunch >> of Python files that use print to output error messages too. Presumably >> you want to wrap these to avoid the broken pipe problem too? >> >> I also found that the driver action in src/modules/actions seems to >> print when it encounters errors. >> >> It may be worthwhile to take this SIGPIPE error handling out of the >> client and put it in some common module that can be used by both the >> client and the server. At least if we need to wrap modules that are >> used by both components. >> >> -j >> >> On Mon, May 19, 2008 at 11:26:08PM -0500, Shawn Walker wrote: >>> >>> The following webrev includes proposed fixes for the following bugs: >>> >>> 115 pkg needs to not have a cow on a SIGPIPE >>> >>> webrev: >>> http://cr.opensolaris.org/~swalker/pkg-115/ >>> >>> -- >>> Shawn Walker >>> >>> "To err is human -- and to blame it on a computer is even more so." - >>> Robert Orben >>> _______________________________________________ >>> pkg-discuss mailing list >>> [email protected] >>> http://mail.opensolaris.org/mailman/listinfo/pkg-discuss >> >> _______________________________________________ >> pkg-discuss mailing list >> [email protected] >> http://mail.opensolaris.org/mailman/listinfo/pkg-discuss > > Perhaps just catching the signal in the bottom of client.py would be > a better plan? > > eg > > except IOError, e: > if e.errno == errno.EPIPE: > exit(1); > raise > > We could do something fancier if needed during actual addition of > pkgs... places in the code using pipes can handle their own exceptions...
I'm trying to avoid a blanket exception handler for the reasons outlined in the bug. If I do a blanket exception handler we'll catch EPIPE in other places where we don't want to, possibly. I'll probably need to create a common function for messaging and then change all the client modules to use it. Cheers, -- Shawn Walker "To err is human -- and to blame it on a computer is even more so." - Robert Orben _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
