Comment 4 for bug 1253833

Revision history for this message
Removed by request (removed3425744) wrote :

> Actually above statement is not entirely correct, "expect fork" and
> "expect daemon" stop tracking pids on exec, and take the execed pid as
> the final. Therefore if one does:
>
> $ cat /etc/init/foo.conf
> expect daemon
> exec sh -c 'sleep 1000 &'
>
> $ sudo start foo
> foo start/running, process 6933
>
> $ ps -axf | grep 6933
> root 6933 0.0 0.0 4352 372 ? S 01:38 0:00 sleep 1000

Ah, you are right here. I had my thougts on such a wrapper script which I'm using which is calling system() for the sleep command. In that case it wouldn't work anymore.

> In that case SIGSTOP
> raised from any process in the process group, would be a valid
> readiness indication.

You mean something like this?

expect stop
exec sh -c 'sleep 1000 & kill -19 $!'