use pidfile_context with the foreground argument