bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Wget 1.16.3 v. VMS


From: Steven M. Schweda
Subject: Re: [Bug-wget] Wget 1.16.3 v. VMS
Date: Thu, 2 Apr 2015 10:30:12 -0500 (CDT)

   While I'm thinking about it, ...

> search!source=hp&q=fred: i/o error
> 
> Cannot write to 'search!source=hp&q=fred' (error 0).
> 
> (Interestingly, in 1.16.1, that last error message was more informative:
> Cannot write to 'search!source=hp&q=fred' (i/o error).
> but I haven't investigated.)

   I quick look (at src/http.c) suggests that both messages use
"strerror (errno)".  The first one is put out promptly after the
failure, and so gets an accurate errno value, but the second one no
longer does.  I'd guess that somewhere in all the intervening activity,
errno gets disturbed (in this case, cleared by some successful
operation).

   Perhaps clearing errno after some successful operation represents a
bug in the run-time library on VMS (although a search for "errno = 0" in
the Wget code will not disappoint), but it might be more reliable to
save a bad status value somewhere other than in errno if any serious
work (which might affect errno) will be done between the actual failure
(like this file open) and any (much later) consumption (like the
generation of this "Cannot write to" message).  Just a thought.

   (I hate errno.  VMS has its faults, but its native system services
return a status value directly to the consumer; they don't stick it into
some common location where it's liable to get lost or damaged.  If you
forget why something failed, it's _your_ fault.)

------------------------------------------------------------------------

   Steven M. Schweda               address@hidden
   382 South Warwick Street        (+1) 651-699-9818
   Saint Paul  MN  55105-2547



reply via email to

[Prev in Thread] Current Thread [Next in Thread]