supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Karthik M <k_mohanas@yahoo.com>
Subject: Re: runit pblms on Mandrake
Date: Tue, 22 Jul 2003 14:31:15 -0700 (PDT)	[thread overview]
Message-ID: <20030722213115.48874.qmail@web14405.mail.yahoo.com> (raw)
In-Reply-To: <20030719080243.GQ26132@may.projectdream.org>

Hi,

That's very interesting to know that some of the getty
like program do invoke setsid() internally and some of
them don't. This should be made standardised that all
of these programs should invoke setsid() internally.
AFAIK there is not mentioning of setsid() needed to be
invoked externally in the man pages for mingetty. :(
:(

I have another question which sprang up when playing
around with the scripts. 

"How does the init process know that a getty process
has died and it needs to be respawned ??"

possible solution:

Getty processes raising a signal such as SIGCHLD when
exiting but when a user logins, getty program uses a
/bin/login binary for user authentication and when the
user login it is either /bin/sh or /bin/bash [or
similar] shells that are in control. A getty process
cannot be observed from the 'ps -aux' output. So it is
not running at all after the user logins into the
system. So when the user logs out then it is the shell
that exits and not the getty process. 

But how does init detect that it needs to respawn a
getty process for that specific tty ??

thanx for all the help and guidance in my learning
process.

Karthik


--- Lukas Beeler <lb-lists@projectdream.org> wrote:
> * Karthik M <k_mohanas@yahoo.com>:
> > I searched thru the man page for mingetty and
> there
> > was no mentioning that it has to be the process
> group
> > leader and we had to invoke setsid() if we need to
> > invoke it seperately !! where do we get all these
> kind
> > of info for debugging such pblms ?? just out of
> > curiosity want to know so that i can search on my
> own
> > before posting it to mailing lists.
> 
> ptrace() mingetty using strace. You'll see that a
> system call
> returns EPERM (I don't remember which one). It's
> seldom that you
> get EPERM when running a program as root. Thus, i
> looked through
> the kernel source for this system call, and found
> out that EPERM
> is returned in case the program is not session
> leader. Finding
> out how to become session leader was a matter of
> quick googling.
> 
> -- 
> Today is the first day of the rest of our lives.
> http://www.suug.ch


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


  reply	other threads:[~2003-07-22 21:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-17  3:10 Karthik M
2003-07-17  6:00 ` Hleil Liu
2003-07-17  6:05   ` Hleil Liu
2003-07-17  6:25     ` Laurent Bercot
2003-07-17  8:51       ` Hleil Liu
2003-07-17 12:33         ` Laurent Bercot
2003-07-17 16:30           ` Karthik M
2003-07-17 17:10             ` Lukas Beeler
2003-07-17 22:22               ` Karthik M
2003-07-19  1:43               ` Karthik M
2003-07-19  8:02                 ` Lukas Beeler
2003-07-22 21:31                   ` Karthik M [this message]
2003-07-22 21:40                     ` Charlie Brady
2003-07-23 18:30                     ` clemens fischer
2003-07-17 19:30           ` Stefan Karrmann
2003-07-18 10:17       ` Gerrit Pape
2003-07-19 17:25       ` Hleil Liu
2003-07-17 16:26   ` Karthik M
2003-07-18 10:20     ` Gerrit Pape
2003-07-18 16:27       ` Lukas Beeler
2003-07-21 10:01         ` some getties require setsid() (Re: runit pblms on Mandrake) Gerrit Pape
2003-07-21 10:13           ` some getties require setsid() Lukas Beeler
2003-07-23 17:03             ` clemens fischer
2003-07-23 17:23               ` Lukas Beeler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030722213115.48874.qmail@web14405.mail.yahoo.com \
    --to=k_mohanas@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).