main: add --print-pid=FILE|FD

When specified, our PID is written to the specified file (or FD),
after we've successfully started up.

Only applicable in server mode.
This commit is contained in:
Daniel Eklöf 2020-02-05 19:53:50 +01:00
parent 9d52c422e1
commit 00d76784f4
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 73 additions and 10 deletions

View file

@ -8,6 +8,7 @@ _arguments \
'(-g --geometry)'{-g,--geometry}'[window WIDTHxHEIGHT, in pixels (80x24 cells)]:geometry:()' \
'(-s --server)'{-s,--server}'[run as server; open terminals by running footclient]:server:_files' \
'--hold[remain open after child process exits]' \
'(-p --print-pid)'{-p,--print-pid}'[print PID to this file or FD when up and running (server mode only)]:pidfile:_files' \
'(-v --version)'{-v,--version}'[show the version number and quit]' \
'(-h --help)'{-h,--help}'[show help message and quit]'