FAQ

On Sun, Aug 11, 2013 at 1:31 AM, Andres Freund wrote:
So, I'd suggest something like:

typedef enum BgwHandleStatus {
BGWH_SUCCESS, /* sucessfully got status */
BGWH_NOT_YET, /* worker hasn't started yet */
BGWH_GONE, /* worker had been started, but shut down already */
BGWH_POSTMASTER_DIED /* well, there you go */
} BgwHandleStatus;


BgwHandleStatus GetBackgroundWorkerPid(BackgroundWorkerHandle *handle, pid_t *pid);
BgwHandleStatus WaitForBackgroundWorkerStartup(BackgroundWorkerHandle *handle, pid_t *pid);
OK, here's a patch that API. I renamed the constants a bit, because a
process that has stopped is not necessarily gone; it could be
configured for restart. But we can say that it is stopped, at the
moment.

I'm not sure that this API is an improvement. But I think it's OK, if
you prefer it.

...Robert

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 11 of 17 | next ›
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedJul 24, '13 at 4:46p
activeAug 28, '13 at 6:44p
posts17
users4
websitepostgresql.org...
irc#postgresql

People

Translate

site design / logo © 2017 Grokbase