Skip site navigation (1) Skip section navigation (2)

Catching server shutdown in C

From: Graeme Hinchliffe <graeme(dot)hinchliffe(at)zeninternet(dot)co(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Catching server shutdown in C
Date: 2004-08-23 08:53:43
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
	I am writing a daemon in C which monitors a table stored in postgres. 
I would ideally like the daemon to be able to withstand things such as
the db connection going away or the db being shutdown, and simply keep
trying to connect rather than just fall on it's face.

	Is there a way that I can catch a server shutdown/connection loss
cleanly?  I did a quick search of the mailling list but didn't see

Thanks for your help

Graeme Hinchliffe (BSc)
Core Internet Systems Designer
Zen Internet (

Direct: 0845 058 9074
Main  : 0845 058 9000
Fax   : 0845 058 9005


pgsql-general by date

Next:From: SVGK, Raju (Raju)Date: 2004-08-23 10:06:03
Subject: view triggers/procedures
Previous:From: Terry YaptDate: 2004-08-23 08:52:40
Subject: Re: Pgsql beta 8 on windows starts and stops automatically.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group