Re: pg_arch.c call to sleep()

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Andrew Dunstan" <andrew(at)dunslane(dot)net>
Cc: "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_arch.c call to sleep()
Date: 2004-11-08 09:45:54
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE4760DE@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

> > 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().

//Magnus

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Katsaros Kwn/nos 2004-11-08 11:45:04 Re: Memory Context problems...
Previous Message Peter Eisentraut 2004-11-08 09:20:06 Re: CREATE TYPE with two args

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2004-11-08 13:07:32 Re: [HACKERS] pg_arch.c call to sleep()
Previous Message Reini Urban 2004-11-08 07:37:58 Re: cygwin build failure