From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1327 Path: news.gmane.org!not-for-mail From: =?iso-8859-2?Q?Dra=BEen_Ka=E8ar?= Newsgroups: gmane.comp.sysutils.supervision.general Subject: graceful restart under runit Date: Wed, 15 Nov 2006 12:47:54 +0100 Message-ID: <20061115114754.GA3759@fly.srk.fer.hr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1163591280 21836 80.91.229.2 (15 Nov 2006 11:48:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Nov 2006 11:48:00 +0000 (UTC) Original-X-From: supervision-return-1563-gcsg-supervision=m.gmane.org@list.skarnet.org Wed Nov 15 12:47:58 2006 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by ciao.gmane.org with smtp (Exim 4.43) id 1GkJFE-0000O3-VQ for gcsg-supervision@gmane.org; Wed, 15 Nov 2006 12:47:57 +0100 Original-Received: (qmail 20669 invoked by uid 76); 15 Nov 2006 11:48:18 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 20663 invoked from network); 15 Nov 2006 11:48:18 -0000 Original-To: supervision@list.skarnet.org Mail-Followup-To: =?iso-8859-2?Q?Dra=BEen_Ka=E8ar?= , supervision@list.skarnet.org Content-Disposition: inline X-Face: 'UIE}WabGB0+U>p-#(hp<_+AD2{H],=qR*jHfm$/e]l0(kU3oOYc5lqG6gg>[\h^IOc{'siD6#!T&loIShgmYHz3#+*D38:|`~\BE,(W~Ol9BDfDwk'lKJ;Z{sY8E9(ME.E]'wvNO`$n#,;9Z`tOFcW/nHZq!BOSrM>V?C<5DTw=<${c{M2V+|)0jSUl&!+8%8nIBF(u:E>SZWM^e User-Agent: Mutt/1.4i X-Attribution: Dave X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (fly.srk.fer.hr [127.0.0.1]); Wed, 15 Nov 2006 12:47:55 +0100 (MET) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1327 Archived-At: Say I have a TCP server which listens on incoming connections on some TCP port. Occasionaly I'd like to install and run a new version of the server executable. Server source is under my control, for all intents and purposes. Normally I'd use SIGUSR1 to make the server close socket on which it listens, finish processing current client sessions (depending on the protocol, that might take seconds, minutes or hours) and exit. Right after sending SIGUSR1 I'd start the new server version which would just work for all new client connections. If the server is managed by runit, things get complicated because runit won't start the new server until the old one exits, so I either have to abort existing client connections or suffer some time without service. Is there a way to get around this? -- .-. .-. Yes, I am an agent of Satan, but my duties are largely (_ \ / _) ceremonial. | | dave@fly.srk.fer.hr