pass pid to --on-error and --on-restart commands