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

@ -65,6 +65,13 @@ execute (instead of the shell).
*--hold*
Remain open after child process exits.
*-p*,*--print-pid*=_FILE_|_FD_
Print PID to this file, or FD, when successfully started. The file
(or FD) is closed immediately after writing the PID. When a _FILE_
as been specified, the file is unlinked when yambar exits.
This option can only be used in combination with *-s*,*--server*.
*-v*,*--version*
Show the version number and quit.