From owner-freebsd-hackers Mon Jun 7 17:28:46 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (Postfix) with ESMTP id 119E314C46 for ; Mon, 7 Jun 1999 17:28:03 -0700 (PDT) (envelope-from julian@whistle.com) Received: from current1.whistle.com (current1.whistle.com [207.76.205.22]) by alpo.whistle.com (8.9.1a/8.9.1) with SMTP id RAA08522; Mon, 7 Jun 1999 17:28:02 -0700 (PDT) Date: Mon, 7 Jun 1999 17:28:01 -0700 (PDT) From: Julian Elischer To: "Eugene M. Kim" Cc: hackers@FreeBSD.ORG Subject: Re: Session leader releasing the ctty In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG you might look to see if 'screen' (in ports) has something that does this when it disconnects from a session. (just an idea) julian On Mon, 7 Jun 1999, Eugene M. Kim wrote: > Hello, > > I'm having a trouble programming a special login shell, and would like > to hear any opinions on this. > > I want this shell (which automatically becomes a session leader) to > release its ctty but remain unterminated (the ctty must be taken by its > child). However, there seems to be no easy way to do this; termios(4) > says one must call setsid() to release its ctty, but setsid(2) says the > call will fail if the caller is already a session leader. > > Would there be any other way for a session leader to release its ctty > without terminating itself? TIA. > > Cheers, > Eugene Kim > > PS. I'm now using a workaround that the shell will forward the SIGHUP > that it received because it's a session leader, but this isn't a clean > way. :-p > > -- > Eugene M. Kim NTT Multimedia Communications Laboratories > Software Developer 250 Cambridge Avenue, Suite 205 > +1 650 833 3630 (Voice) Palo Alto, CA 94040, USA > +1 650 833 3633 (Fax) mailto:gene@nttmcl.com > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message