From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1187 Path: news.gmane.org!not-for-mail From: Gerrit Pape Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: Runit on tty1 Date: Fri, 30 Jun 2006 09:27:59 +0000 Message-ID: <20060630092759.27727.qmail@c80d5cd64668b0.315fe32.mid.smarden.org> References: <449C4064.6050504@langside.org.uk> <44A4EA83.5080800@langside.org.uk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1151659678 6894 80.91.229.2 (30 Jun 2006 09:27:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 30 Jun 2006 09:27:58 +0000 (UTC) Original-X-From: supervision-return-1423-gcsg-supervision=m.gmane.org@list.skarnet.org Fri Jun 30 11:27:56 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 1FwFHm-0005pt-Sq for gcsg-supervision@gmane.org; Fri, 30 Jun 2006 11:27:39 +0200 Original-Received: (qmail 18402 invoked by uid 76); 30 Jun 2006 09:28:00 -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 18397 invoked from network); 30 Jun 2006 09:28:00 -0000 Original-To: supervision@list.skarnet.org Mail-Followup-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: <44A4EA83.5080800@langside.org.uk> Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1187 Archived-At: On Fri, Jun 30, 2006 at 10:10:27AM +0100, Richard Downing wrote: > Richard A Downing FBCS CITP wrote: > >Further investigation reveals that runit, as process 1, is marked by > >ps-ef as being on tty1 and the bash process started by getty-1 is marked > >as ? for it's TTY. I suspect this is the problem, as it is quite unlike > >my other runit-based systems. > >There are no errors in the runsvdir proctitle. > > > >Does anyone have any idea what has gone wrong? > > I've just upgraded to runit-1.6.0, but I have the same problem. What > could cause runit to be connected to tty1? I'm not sure, sorry. This is what the runit program does: o on startup open /dev/console and set controlling terminal through ioctl(ttyfd, TIOCSCTTY, (char *)0) (if possible) o forking stage 1, which should have full control of console to start an emergency shell for example, runit reopens /dev/console read-write o forking stage 2 or 3, runit drops the controlling tty through setsid() See src/runit.c, you could test removing the ioctl(), or adding setsid() at some place. Please report back if you happen to find out what's different on your system. Thanks, Gerrit.