Hi Micah, Micah Cowan <[email protected]> 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
