On 04/27/2015 11:26 AM, enh wrote: >>> it would also result in things like top(1) not exiting. >> >> If top is using stdio, it's easy to add a single ferror(stdout) check >> to the main loop. If it's using write(), it _must_ be checking for >> errors anyway since write can always return with a short/partial >> write. But top is unlikely to be hooked up to a pipe or socket anyway; >> it normally needs a terminal. > > the point is that then people need to think. if that were a plausible > solution, this thread wouldn't exist. the advantage of the signal > handler is that humans can keep on being humans.
I _so_ should have called this project Dorodango. (See http://www.dorodango.com.) The point of this project is to do things right. I want to _fix_ everything I can. My insane cleanup review passes involve trying to find all this stuff and make sure we get it right. Sure, outside toybox yay sigpipe. But inside, the question is what the correct behavior should be. It sounds like android wants _exit(0) and everybody else wants sigpipe blocked and pipe full treated like disk full. I have a patch right now that'll do that, but this seems contradictory and I'd like to implement one consistent behavior if we can agree on what it should _be_... Rob _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
