On Tue, 2011-09-27 at 11:58 -0700, Sergey Poznyakoff wrote: > Kevin Fox <[email protected]> ha escrit: > > > It can use SIGTSTP/SIGCONT instead, but to the same effect I think. > > There are a few other ones a terminal can issue too like SIGTTIN and > > SIGTTOU. > > Each signal has its own purpose. Delivering SIGTTIN where there is > no tty input for background process does not seem a good idea.
Agreed. :) > For instance, tar itself does not handle neither of these signals (it > doesn't have to, anyway), No, tar the process handles them, it just doesn't explicitly handle them, relying on whatever the default is. That doesn't mean that the default implementation of the signal handlers are guaranteed to keep you safe from a partial read when interrupted. In fact, the gnu documentation explicitly says otherwise. > so when delivered any of them it will simply > stop, as their semantics dictates (see man 7 signal). That's perhaps > not what you want. No, what could happen is a user could stop tar mid stream, then continue it, and a read might show up partial and tar would freak out. Not what a user would expect. Its the same bug, just triggered by different means. Thanks, Kevin > > Regards, > Sergey
