use --restore-detached
moar wip
actually pass a tmpnam()'d pidfile