I have a program written in C (foo). In addition there is a startup script(foo2) which should run this program (under /etc/rc.d/init.d directory).
The script is a generic startup script and the relevant command in the script which runs the program is:
daemon foo $foo_parameters
The foo_parameters are read well from a config file under sysconfig.
When I'm using the command "foo2 start" the foo program is executed as expected but the script remains stucked on the daemon line and do not execute the lines after.
When debugging this issue I found out the exact line in daemon function where it really stucked.
The line is:
$nice initlog $INITLOG_ARGS -c "$*"
Any idea what I'm doing wrong?