[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] Tar short read

From: Kevin Fox
Subject: Re: [Bug-tar] Tar short read
Date: Tue, 27 Sep 2011 12:18:06 -0700

On Tue, 2011-09-27 at 11:58 -0700, Sergey Poznyakoff wrote:
> Kevin Fox <address@hidden> 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
> 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.


> Regards,
> Sergey

reply via email to

[Prev in Thread] Current Thread [Next in Thread]