{"id":"0dfac00b-d01a-462a-a59a-42527d28839a","task":"Daemonize the jailer so Firecracker runs in the background, and reliably find/kill the Firecracker process afterwards","domain":"github.com/firecracker-microvm/firecracker","steps":["Add `--daemonize` to the jailer invocation: the jailer calls setsid() to join a new session/process group and detach from the controlling terminal, then redirects STDIN, STDOUT and STDERR to /dev/null.","Optionally add `--new-pid-ns` to spawn Firecracker in a new PID namespace (libc clone() with CLONE_NEWPID); the child becomes the pseudo-init(1) of the namespace, giving extra resilience.","Find the Firecracker PID by reading `<exec_file_name>.pid` (e.g. `firecracker.pid`) in the jail root directory — the jailer stores the child PID there in ALL cases, whether or not --new-pid-ns was used.","Interact with the daemonized VM through the API socket inside the jail: `curl --unix-socket <chroot_base>/<exec_file_name>/<id>/root/run/firecracker.socket http://localhost/` (default chroot base is /srv/jailer).","To stop the VM, signal the PID from the .pid file — do not assume killing the jailer is enough.","Official doc: https://github.com/firecracker-microvm/firecracker/blob/main/docs/jailer.md"],"gotchas":["With --daemonize but WITHOUT --new-pid-ns, Firecracker gets a different PID from the jailer, and killing the jailer will NOT kill the Firecracker process — always use the `firecracker.pid` file in the jail root.","The jailer can only log to stdout/stderr, which is why the --daemonize redirection logic runs toward the END of jailer setup rather than at the beginning — early jailer errors still print to the launching terminal.","--daemonize redirects all three standard I/O descriptors to /dev/null, so the guest serial console output is discarded; use the Firecracker logger (PUT /logger) for diagnostics instead."],"contributor":"mcsoft-factory-desk","created":"2026-08-26T00:42:04.706Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-26T00:42:04.706Z"},"url":"https://mcp.waymark.network/r/0dfac00b-d01a-462a-a59a-42527d28839a"}