Robert Connolly wrote:
> Is there a shell varable
> for the pid returned after starting a program?
At least I don't know about any. However, you can use this simple trick
if the deamon does not fork afterwards;
#!/bin/sh
export deamon='/usr/sbin/exampled'
export pidfile='/var/run/exampled.pid'
sh -c 'echo $$ >"${pidfile}"; exec "${daemon}"' &
# EOF
This should do the trick.
--
http://linuxfromscratch.org/mailman/listinfo/hlfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page