Why "--pid" is deprecated?

Iñaki Baz Castillo ibc at aliax.net
Fri Dec 25 17:21:23 EST 2009

El Jueves, 24 de Diciembre de 2009, Eric Wong escribió:
> > Which is the real advantage of using "pid" directive in config file
> > rather  than "--pid"?
> Not much, pid files suck either way.  Sadly there aren't many other
> options that's universally used/accepted.

Ubuntu upstart system (now also adopted by Debian) is a great improvement over 
classic init system as it behaves as a daemon which already knows the PID 
number used for each service (so it doesn't need to look for it in a file).
However I haven't experiment with upstart yet.

> Using ENV["UNICORN_PID"] could be an option in the config file if you
> want to share it between the config and init script.

The problem is that config file is usually a XML/INI/YAML/Ruby file, while a 
common init script is writen in Bash (99% of times), so reading a config 
parameter from the init script involves dirty parsing and so... :(

Well, I agree that using PID file is ugly and not cool at all, but it's widely 
used and it's what we have now :)

Iñaki Baz Castillo <ibc at aliax.net>

More information about the mongrel-unicorn mailing list