All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Egger <degger@fhm.edu>
To: Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>
Subject: 2.5: daemonize() playing tricks with ttys?
Date: 20 Apr 2003 23:59:43 +0200	[thread overview]
Message-ID: <1050875983.899.2.camel@sonja> (raw)

[-- Attachment #1: Type: text/plain, Size: 755 bytes --]

Hija,

I'm trying to spawn new threads from a function called from alloc_uid
using daemonize () as soon as a new user appears on the system. Somehow 
this detaches the original shell from the tty causing an exit not
only of the child but also it's parent.

A diagram of the situation would lock like this:

getty -> (login of root) bash -> (su to another user) bash ->
[new thread is spawned] (whatever) -> exit -> getty

Alternativly, when directly logging in a non-root user:
getty -> (login of foo) motd -> [hang]

How can I daemonize something without disturbing other processes?
I already tried playing with reparent_to_init and some signal stuff
as done by other parts of the kernel but to no avail.

-- 
Servus,
       Daniel

[-- Attachment #2: Dies ist ein digital signierter Nachrichtenteil --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

                 reply	other threads:[~2003-04-20 21:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1050875983.899.2.camel@sonja \
    --to=degger@fhm.edu \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.