[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] Strange wget behavior when saving to stdout
From: |
Giuseppe Scrivano |
Subject: |
Re: [Bug-wget] Strange wget behavior when saving to stdout |
Date: |
Sat, 16 Jun 2012 11:43:57 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
Hi Micah,
Micah Cowan <address@hidden> writes:
> At first, I assumed wget was using errno improperly. Imagine my
> surprise, though, when running wget under a debugger, to find that at
> the tail end of main(), exit() gets called with an argument value of 0.
> But gdb then still reports a non-zero exit status - and this "wget:
> write error: No such file or directory" seems to get called _after_ wget
> calls exit.
>
> I finally figured out what's happening by setting a breakpoint at exit,
> and then setting one on write(), _after_ that first point hits.
it smells like a regression in gnulib. I remember it was detecting
correctly EBADF before without report any error. Wget already closes
stdout in the "cleanup" function so when gnulib later attempts to do the
same thing.
I am thinking about not using the close_stdout module but registering
"cleanup" at exit, I am going to investigate it.
Thanks to have reported it.
Giuseppe