"Jesper Louis Andersen" <[EMAIL PROTECTED]> writes:

>> The latest source (available in CVS) has a better sleeping function
>> that uses nanosleep where available, and that handles usleep's
>> wraparound for long sleeps.  But it still can call usleep with values
>> larger than 1,000,000.  I've attached a patch that fixes the CVS
>> source.
>
> nanosleep() returns EINVAL for values less than zero or greater than
> 1000 million. This may or may not hurt you.

That is true for the nanoseconds field.  But nanosleep allows you to
specify seconds and nanoseconds separately, which Wget does.
(nanosleep is also nicer because it allows easy recovery from sleep
being interrupted by a signal.)

>> sleep(3) cannot sleep for less than a second.  I like the idea of
>> being able to specify `--wait 0.5' for Wget to wait for half a second
>> between retrievals.
>
> This I see. A suggestion from David Laight was to use poll():
>
>       poll(0, 0, 1000L * opt.wait);

That change would work fine for NetBSD.  I don't think you need to
worry about signals being delivered to the code at that point.

Reply via email to