- Add an exclusive instance lock and detect an already-running Firefox on the profile, so a second launch exits with a notification instead of clobbering the first - Write the instance PID to instance.lock and record app_run_pid in active_ports.json - Write active_ports.json atomically and only remove it on cleanup if this instance wrote it - Rotate router.log to router.log.1 once it reaches MOON_I2P_LOG_MAX_BYTES (default 5 MiB) and mark each start in the log - Close the lock fd in the router and Firefox children so they do not hold the lock