lkml.org 
[lkml]   [2003]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subject2.5: daemonize() playing tricks with ttys?
From
Date
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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.022 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site