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: 1093251222.26817.5.camel@office-137.zen.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hiya
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
anything.

Thanks for your help

--
-----
Graeme Hinchliffe (BSc)
Core Internet Systems Designer
Zen Internet (http://www.zen.co.uk/)

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

Responses

Browse pgsql-general by date

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