Add -d mode for agents and don't wait for newline
Claude Code is struggling a lot with using pdsfs. This is the changes it suggests to make pdsfs actually usable.
---
## Summary
Add daemon mode (`-d` flag) and change foreground mode to use ctrl-c instead of "hit enter".
**Motivation:** The "hit enter to unmount" pattern doesn't work well with scripts or automated tools - stdin may be closed or unavailable. The ctrl-c pattern is more standard for long-running foreground processes.
**Changes:**
- Add `-d`/`--daemon` flag that backgrounds the mount process and exits the parent when the mount is ready (follows the same pattern as `rclone mount --daemon`)
- Change foreground mode from "hit enter" to ctrl-c
- Update readme to reflect new behavior
**Usage:**
```bash
# Foreground (ctrl-c to unmount)
pdsfs oppi.li
# Daemon mode (parent exits when mount is ready)
pdsfs -d oppi.li && ls mnt/
```
The daemon mode uses a Unix socket pair for the child to signal readiness to the parent, with a 120-second timeout.
authored by
danabra.mov
and committed by
tangled.org
43ec8bdb
793d85eb