Petteri Räty <[email protected]> wrote: > On 26.11.2013 3.20, Eric Wong wrote: > > How about having the old process create a hard link to .oldbin, > > and having the new one override the pid if Process.ppid == pid file? > > The check is still racy, but that's what pid files are :< > > Isn't it possible to always keep a valid pid file by using the fact that > mv is atomic? Basically the new process writes the pid first to a temp > file and then moves it over the old pid file after having hard linked > the file to .oldbin? > > $ echo "1" > foo.pid > $ ln foo.pid foo.oldpid > $ echo "2" > tmp > $ mv tmp foo.pid > $ cat *pid > 1 > 2
It's possible, but is it worth it? Having both pid files point to the same pid is still wrong. _______________________________________________ Unicorn mailing list - [email protected] http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying
