[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: builtin echo command redirection misbehaves in detached scripts when
From: |
Chet Ramey |
Subject: |
Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed |
Date: |
Mon, 10 Sep 2007 09:18:55 -0400 |
User-agent: |
Thunderbird 2.0.0.6 (Macintosh/20070728) |
Dmitry Potapov wrote:
>
> Unfortunately, you are right. I did not foresee that some shells may use
> "dup2(open("file.txt"), fileno(stdout))". It is a dirty hack, which may
> cause some other problems. Frankly, I am a bit surprised that bash uses
> printf instead of write(2). BTW, you cannot use 'printf' in signal
> handlers, so it seems that you cannot use 'echo' in trap commands too.
Luckily, neither of these things is true.
What's needed is a portable interface like BSD's fpurge(3).
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Live Strong. No day but today.
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed, (continued)
- Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed, Stephane Chazelas, 2007/09/09
- Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed, Pierre-Philippe Coupard, 2007/09/09
- Re: Bug#429021: builtin echo command redirection misbehaves in detached scripts when terminal is closed, Aurelien Jarno, 2007/09/10
- Re: Bug#429021: builtin echo command redirection misbehaves in detached scripts when terminal is closed, Stephane Chazelas, 2007/09/10
- Re: Bug#429021: builtin echo command redirection misbehaves in detached scripts when terminal is closed, Dmitry Potapov, 2007/09/10
- Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed, Dmitry Potapov, 2007/09/10
- Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed, Stephane Chazelas, 2007/09/10
- Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed, Dmitry Potapov, 2007/09/10
- Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed, Stephane Chazelas, 2007/09/10
- Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed, Dmitry Potapov, 2007/09/10
- Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed,
Chet Ramey <=
- Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed, Andreas Schwab, 2007/09/10
- Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed, Eric Blake-1, 2007/09/10
- Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed, Chet Ramey, 2007/09/10
- Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed, Stephane Chazelas, 2007/09/10
- Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed, Dmitry Potapov, 2007/09/10
- Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed, Stephane Chazelas, 2007/09/10
- Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed, Andreas Schwab, 2007/09/09
Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed, Eric Blake, 2007/09/09