Re: init + orphaned processes
From: Doug Freyburger (dfreybur_at_yahoo.com)
Date: 03/29/04
- Next message: Stefaan A Eeckels: "Re: run tomcat as a deamon?"
- Previous message: Davide Bianchi: "Re: The OS File responsible for Login Prompt Display"
- In reply to: Matty: "init + orphaned processes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Mar 2004 06:12:51 -0800
Matty wrote:
>
> This causes the program to execute in place of
> the shell (not sure why the vendor coded it this
> way).
Poor coding mostly.
> For some reason, when users disconnect,
> the processes (blah in this case) goes off into
> lala land. The PPID is 1, which should allow init
> to clean it up.
Having a PPID of 1 does NOT mean it has become a zombie.
It means it has gone "nohup" so when users disconnect
it will not autmoatically be terminated. See the man
page for nohup on the uses of this.
1) What you have is a program that takes specific effort
to become immune to hangups, and your users hang up on it.
This is at least partially a user training issue. Teach
them to "don't do that then". Seriously. The program
must have some way for them to exit it before they
logout or drop the modem connection or whatever they are
doing. Exitting programs on the screen before logging
out is something that every SysAdmin *must* do to set an
example for our users, and it is something that users
must do to prevent this sort of problem.
> Does anyone know when init will
> terminate processes it inherits and reclaim
> the resources?
Init never terminates procresses, it just waits for them
after the exit. ps output for these programs will not
show them to be "<defunct>" so they still think they are
waiting on user input.
You will need to kill the old ones by hand, and as your
new training program starts to work you will gradually
have fewer and fewer of them to deal with.
2) Also complain to the vendor that it is going nohup and
ask them how to stop it from nohup'ing. If you switch it
to not nohup, when the users hang up they will terminate
in their own and do your clean-up for you.
- Next message: Stefaan A Eeckels: "Re: run tomcat as a deamon?"
- Previous message: Davide Bianchi: "Re: The OS File responsible for Login Prompt Display"
- In reply to: Matty: "init + orphaned processes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|