loadproc in bootscript function
dscholz at reido.de
Fri Nov 24 03:20:24 PST 2000
at the moment I try to understand the bootscripts of my LFS 2.4.2 system,
but I'm not a bash guru.
So, here's my question:
I don't know, what's happening in the loadproc (and in the related killproc)
function in the file functions.
What I've figured out so far:
The function starts by checking if the necessary parameter (the name of the
program) is available.
Then it stores the basename of the programm, we want to start in the
After that the result of the pidof command is stored in pidlist. pidof
returns process IDs.
man pidof says -o excludes process ID's ($$ -> process of the running shell,
%PPID -> process of pidof (right?) and $PPID -> what's that??? are
excluded); -x means that the process ID of the shell should be echoed, if we
want to start a script.
The result should be a process ID of the program we want to start, am I
right? But how can there be a process ID, if the program doesn't run (we
havn't started it yet)?
The for-loop fills $pid with the result of pidlist (a process number), if
there ist a corresponding directory in /proc.
Then we test if pid is not empty (process/program is running) and if it runs
we start it again and check the return value ????????????????
Ok, the script works, so I'm wrong. What is my mistake.
Thanks in advance, Dieter
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message
More information about the lfs-dev