All of lore.kernel.org
 help / color / mirror / Atom feed
From: xerofoify@gmail.com (nick)
To: kernelnewbies@lists.kernelnewbies.org
Subject: catch exit status of daemon
Date: Tue, 06 Jan 2015 10:35:33 -0500	[thread overview]
Message-ID: <54AC00C5.4080502@gmail.com> (raw)
In-Reply-To: <CAJnayPA5ZRnPURakkB160rc-4+BcQv6G1N0hNwYtMFhx9VnPYw@mail.gmail.com>

Yash,
There are two ways to do this either use the signals API or IPC(inter-process communication)
libraries. I don't known the functions off the top of my head but this can get you started.
Nick

On 2015-01-06 10:22 AM, Yash Jain 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.
> 
> Thanks in advance
> 
> Regards,
> Yash.
> 
> 
> 
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> 

  reply	other threads:[~2015-01-06 15:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-06 15:22 catch exit status of daemon Yash Jain
2015-01-06 15:35 ` nick [this message]
2015-01-06 16:24 ` Valdis.Kletnieks at vt.edu
2015-01-06 16:46 ` Anuz Pratap Singh Tomar
2015-01-06 19:27   ` Nizam Haider
2015-01-07  8:05     ` Sudip Mukherjee
2015-01-07  9:10       ` Yash Jain
2015-01-07 22:58         ` Bernd Petrovitsch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54AC00C5.4080502@gmail.com \
    --to=xerofoify@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.