catch exit status of daemon

Sudip Mukherjee sudipm.mukherjee at
Wed Jan 7 03:05:56 EST 2015

On Wed, Jan 7, 2015 at 12:57 AM, Nizam Haider <nizamhaider786 at> wrote:
> Anuz Pratap Singh Tomar <chambilkethakur <at>> writes:
>> On Tue, Jan 6, 2015 at 3:22 PM, Yash Jain <yash2learn <at>>
> wrote:Hello All,I have one dumb question,
>> I wanted to write a process which monitors the exit status of the daemon,
>> The Main process would fork a service, which would internally fork a child
> and , exit from the process. If main process wants to query the status of
> the daemon, how it can be achived.
>> For ex :
>> Process A would call a syslog service, which would internally fork a
> child, daemon it and exit, so if process A wants to wait for the syslog
> process, is it possible.
>> waitpid()
>> signal()

doubt --
wait and waitpid will be for the parent process to wait for its child.
but for a daemon the parent is init .
so the exit status should be sent to init and not to his process. then
how does he get the exit status



More information about the Kernelnewbies mailing list