From: Glynn Clements <glynn.clements@virgin.net>
To: Luciano Moreira - igLnx <lucianolnx@ig.com.br>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: Detecting deamons running
Date: Sat, 29 Mar 2003 00:45:51 +0000 [thread overview]
Message-ID: <16004.60607.261721.211481@cerise.nosuchdomain.co.uk> (raw)
In-Reply-To: <026301c2f583$6d71a340$0b00a8c0@SPLUCIANO>
Luciano Moreira - igLnx wrote:
> EXPLAINING BETTER:
>
> Today we'are writing the PID to a file, and when it is used (later), is
> necessary to test de PID with "kill(pid, 0);", but still existing a problem:
>
> When the deamon is droped down with SIGKILL, and the others programs or my
> users stay a long time without consulting the deamon's PID, the OS could
> raise a new process with the same PID (currently free), that is saved in the
> deamon's PID file.
>
> How can this problem be fixed ? (how is it fixed today ?)
It can't be fixed, and all existing daemons have the same problem.
OTOH, most daemons run under system accounts, so normal users can't
send signals to them, and anyone with root privilege presumably has
enough sense not to use SIGKILL.
> (Somebody suggest us to use shared memory (or SOCKET) mated with another
> deamon, that whould be the "PID Server", instead using PID file - We think
> that it's bad and so complex, and still can give us a "infinite problem" if
> we need to control the new mated deamon)
What exactly is the .pid file meant to achieve? Is it just a
convenience, or are there system integrity considerations?
--
Glynn Clements <glynn.clements@virgin.net>
next prev parent reply other threads:[~2003-03-29 0:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-28 17:20 Detecting deamons running Luciano Moreira - igLnx
2003-03-28 19:45 ` Andrés Roldán
2003-03-28 21:30 ` Glynn Clements
2003-03-28 23:40 ` Luciano Moreira - igLnx
2003-03-29 0:45 ` Glynn Clements [this message]
2003-03-29 16:51 ` Luciano Moreira - igLnx
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=16004.60607.261721.211481@cerise.nosuchdomain.co.uk \
--to=glynn.clements@virgin.net \
--cc=linux-c-programming@vger.kernel.org \
--cc=lucianolnx@ig.com.br \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).