From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] pg_arch.c call to sleep() |
Date: | 2004-11-08 13:07:32 |
Message-ID: | 418F6F94.3080504@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Magnus Hagander wrote:
>>>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).
>>
>>
>
>win32 signal handling won't interrupt sleep(), just pg_usleep().
>
>
>
>
I take this as confirmation that calling pg_usleep is the Right Thing (tm).
Here's the patch.
cheers
andrew
Attachment | Content-Type | Size |
---|---|---|
pgarch.patch | text/x-patch | 1.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Gaetano Mendola | 2004-11-08 13:08:38 | Re: NoMovementScanDirection |
Previous Message | Gaetano Mendola | 2004-11-08 13:02:22 | Re: Increasing the length of pg_stat_activity.current_query... |
From | Date | Subject | |
---|---|---|---|
Next Message | Maarten Boekhold | 2004-11-08 14:45:58 | Re: cygwin build failure |
Previous Message | Magnus Hagander | 2004-11-08 09:45:54 | Re: pg_arch.c call to sleep() |