On Sat, Apr 06, 2013 at 10:07:40AM +0200, Thomas Rast wrote:
> The manpage for dup2 does, however, say
>
>If newfd was open, any errors that would have been reported at
>close(2) time are lost. A careful programmer will not use dup2() or
>dup3() without closing newfd first.
>
>
Petr Baudis writes:
> On Fri, Apr 05, 2013 at 11:57:19AM -0700, Junio C Hamano wrote:
> The thing is, I was confused about dup2() all along as my old UNIX
> masters taught me that I must close() the original descriptor first
> and since that's what's commonly done anyway, I never thought to
> d
On Fri, Apr 05, 2013 at 11:57:19AM -0700, Junio C Hamano wrote:
> Petr Baudis writes:
> >> > -if (defined $opts{STDERR}) {
> >> > -close STDERR;
> >> > -}
> >> > if ($opts{STDERR}) {
> >> >
Petr Baudis writes:
>> >} elsif ($pid == 0) {
>> > - if (defined $opts{STDERR}) {
>> > - close STDERR;
>> > - }
>> >if ($opts{STDERR}) {
>> >open (STDERR, '>&', $opts{STDERR})
>>
Hi!
On Thu, Apr 04, 2013 at 10:41:41PM +0200, Thomas Rast wrote:
> As pointed out by Eric Wong (thanks), the initial close needs to go:
> die() would again write nowhere if we close STDERR beforehand.
>
> > Perhaps we should also do the following:
> >
> > --- a/perl/Git.pm
> > +++ b/perl/Git.pm
Thomas Rast wrote:
> As pointed out by Eric Wong (thanks), the initial close needs to go:
> die() would again write nowhere if we close STDERR beforehand.
>
> Signed-off-by: Thomas Rast
Acked-by: Eric Wong
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of
6 matches
Mail list logo