Re: pg_arch.c call to sleep() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_arch.c call to sleep()
Date
Msg-id 23379.1099855700@sss.pgh.pa.us
Whole thread Raw
In response to pg_arch.c call to sleep()  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: pg_arch.c call to sleep()
Re: pg_arch.c call to sleep()
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> We have the following warning on Windows:
> pgarch.c:349: warning: implicit declaration of function `sleep'

> To fix it we could include the right header (which appears to be 
> <stdlib.h> in the Windows/Mingw case), or we could replace the call by a 
> call to pg_usleep().

<stdlib.h> is included automatically by c.h, so that surely won't fix it.

I have some recollection that we invented pg_usleep in part because we
wanted to not use sleep() at all in the backend, but I don't recall why
(and the reasoning might not apply to the archiver process, anyway).
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Proposal for Recover mode in pg_ctl (in 8.0)
Next
From: Tom Lane
Date:
Subject: Re: Memory Context problems...