Welcome! Log In Create A New Profile

Advanced

Re: Location of PID file (or executable) at runtime

April 07, 2010 05:51PM
Manlio Perillo Wrote:
-------------------------------------------------------
> Tronman ha scritto:
> > Hi there,
> >
> > I'm looking for a way to find the fully
> qualified path of the "PID" file at run time.
>
> What do you mean by "run time"?
>
> The path to the PID file is well know.
>
> You just need to check when the file is modified
> (as an example, using
> inotify on Linux or kqueue on FreeBSD)
>
> > [...]
>
>
> Regards Manlio
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx


By runtime I simply mean when the server is running. I can specify the path to the PID file in the configuration file, but if I don't, it usually sticks it in "logs/nginx.pid". But that logs/nginx.pid could be anywhere I built the server from source (it specifies a default path when you run configure). So the file could be in /bla/bla2/bla3/logs/nginx.pid.

What I'm trying to find is the entire path of where it sticks the PID file when you start the server. For now, I'm specifying the full path in the path file, and I can extract that using the configuration functions regularly enough, but it's a bit annoying. So I'm wondering if I can get it's path when it's not specified. Just wondering if there's a better way. I will take a look at events module too, thanks.
Subject Author Posted

Location of PID file (or executable) at runtime

Tronman April 07, 2010 09:24AM

Re: Location of PID file (or executable) at runtime

Tronman April 07, 2010 09:33AM

Re: Location of PID file (or executable) at runtime

Reinis Rozitis April 07, 2010 05:38PM

Re: Location of PID file (or executable) at runtime

Manlio Perillo April 07, 2010 05:46PM

Re: Location of PID file (or executable) at runtime

Tronman April 07, 2010 05:51PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 304
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready