From: wwp <subscript@free.fr>
To: Glynn Clements <glynn.clements@virgin.net>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: static or stuff like that
Date: Tue, 30 Apr 2002 23:26:31 +0200 [thread overview]
Message-ID: <20020430232631.046def4f.subscript@free.fr> (raw)
In-Reply-To: <15565.5881.728128.202346@cerise.nosuchdomain.co.uk>
Hi Glynn,
On Mon, 29 Apr 2002 10:48:41 +0100 Glynn Clements
<glynn.clements@virgin.net> wrote:
> > > > I want to control whether a process is already running or not,
> > > > and i don't know how without using some kind of lock-files
> > >
> > > You can scan the files under /proc/<pid> to obtain details about
> > > which processes are running. E.g. /proc/<pid>/exe is a symlink to
> > > the program which process <pid> is executing.
> >
> > Is /proc always available?
>
> It's possible that /proc isn't mounted but, if it isn't, many OS
> features won't work (e.g. modprobe). Unless you're targeting a very
> minimal system (e.g. embedded systems), or writing code which will run
> early in the boot sequence, it's safe to assume that /proc will be
> available.
[snip]
Thanx for your answers.
I've also seen software using unix domain socket to prohibit duplicate
launch of a program on a POSIX system.
What do you think of this method, Glynn?
Regards,
--
wwp
next prev parent reply other threads:[~2002-04-30 21:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-28 16:59 static or stuff like that Wrazlov
2002-04-28 21:52 ` Glynn Clements
2002-04-29 9:09 ` wwp
2002-04-29 9:48 ` Glynn Clements
2002-04-30 21:26 ` wwp [this message]
2002-05-01 0:12 ` Glynn Clements
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=20020430232631.046def4f.subscript@free.fr \
--to=subscript@free.fr \
--cc=glynn.clements@virgin.net \
--cc=linux-c-programming@vger.kernel.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 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).