Results 1 to 2 of 2
Hello I´d like to know in which order are my Linux resources (programs,network,filesystems..) closed when i send a SIGINT signal to init (pid=1) process,and how could I change that order ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-14-2012 #1
- Join Date
- Dec 2011
shutdown order on kill -SIGINT 1
I´d like to know in which order are my Linux resources (programs,network,filesystems..) closed when i send a SIGINT signal to init (pid=1) process,and how could I change that order so i can be completly sure that some application X has been shutdown before some other.
I´m not sure which order is followed when message "sending all processes kill signal" appears.Are some scripts executed in order or it just kills all processes in unknown order?
- 10-14-2012 #2
- Join Date
- Dec 2009
I only know the basics about this stuff and will try to explain them.
The keyword is inittab
In most Linux systems you will find a inittab which contains a script for every program that shall start or stop.
Most times they are in the folder: "/etc/init.d/"
Then there are different init - levels ...
init 3 : commandline
init 5 : grafical interface
init 0 : shutdown
and so on...
For each level you will find a directory with soft-links to the script ... starting with: S##_ or K##_
S ... Start
K ... Kill
## a Number
These scripts will be executed in order of the number.
/etc/rc.1 (contains all links to go into init 1)
On newer Systems the system changed to different deamon configuration files ... but somehow the old inittab still seems to be integrated.