escape $ when writing out pid file