Fix commit 818e8e11: Add a set_proc_title() function
Fix commit 818e8e11: Add a set_proc_title() function

Commit 818e8e11 introduced a set_proc_title() function. Unfortunately it
had a problem with segfaulting if it was called by a child process that
had been fork'd after one had died, this then caused and infinate loop of
fork/segfault.

Re-work this function based on code from nginx, this seems to work
properly even when a child has died and a new one fork'd.

Signed-off-by: Andrew Clayton <02e0a999c50b1f88df7a8f5a04e1b76b35ea6a88@opentechlabs.co.uk>

ac000/receiptomatic