[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: builtin echo command redirection misbehaves in detached scripts when
From: |
Stephane Chazelas |
Subject: |
Re: builtin echo command redirection misbehaves in detached scripts when terminal is closed |
Date: |
Sun, 9 Sep 2007 19:34:52 +0100 |
User-agent: |
Mutt/1.5.16 (2007-06-11) |
On Sun, Sep 09, 2007 at 07:10:59PM +0100, Stephane Chazelas wrote:
[...]
> What OS and version of glibc? I do get the error message but I
> get both a and b in the file.
>
> That was on Linux, glibc 2.6.1.
[...]
Actually,
bash -c 'echo a; echo b > a' >&-
is enough for me to reproduce the problem.
And that program below shows the same behavior when run as
./a.out >&-
#include <stdio.h>
#include <fcntl.h>
int main()
{
printf("a\n");
fflush(stdout);
dup2(open("a", O_WRONLY|O_CREAT, 0644), 1);
printf("b\n");
fflush(stdout);
return 0;
}
--
Stéphane
- 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, Andreas Schwab, 2007/09/09
- Message not available
- 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,
Stephane Chazelas <=
- 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, 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