Hello All,
I am using RedHat 7.0 and I have a program called load that I am trying to
start as a daemon. I wrote a script to place in /etc/init.d that has
start,stop and status functions. In my start function I have a choice of
starting the program in two ways:
1) saying "daemon load"
2) doing a cd to where my exe file is located then running it.
I would prefer to do it by using the daemon command but am having some
problems that I hope you can help me with. Here is what happens when I use
the daemon command in my script. When I run my script (/sbin/service load
start) and do a ps -x, I see five PIDS associated with load (Note: I'll use
letters in my example in place of the PID numbers) A) sh
/etc/init.d/load start
B) initlog -q -e load
C) sh /usr/sbin/load
D) ./load
E) sh /sbin/service load start
If I do a status command (/sbin/service load status), it tells me that
"load (PID A, C ,D) are running". When I stop the daemon (/sbin/service
load stop) it stops but I also get an error message: "/etc/init.d/load:
Kill(C) - No such pid" If I were to just start my program (./load) and
do a ps -x, there is only one PID associated with it.
Why when I use the daemon command are so many pids associated with load and
how do I stop the daemon without getting the error message?
Any help would be greatly appreciated! Thanks!
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list