1 .\" Manpage for nuseradd.
2 .\" Contact vivek@nixcraft.net.in to correct errors or typos.
3 .TH fag 1 "07 February 2017" "1.0" "User Commands"
6 fag \- daemonize program after a string was found (ForkAfterGrep)
13 .RI [ ARGUMENTS .\|.\|.]
21 This is useful if a program takes a while to initialize and prints a message to stdout or stderr when ready. When placed in a script,
23 blocks execution until the pattern was found, then daemonizes the child process, returns the PID on stdout and exits.
25 .SS "Behaviour Changing Options"
27 .BI \-t " SECONDS" "\fR
32 .BR \-k " [" \fISIGNAL\fP "]
33 If given, send a signal to
38 Right now, only decimal notation is implemented.
49 Be verbose; print program's
54 .SS "Generic Program Information"
57 Output a short usage message and exit.
60 Display version and copyright information and exit.
64 was found, 0 is returned. Otherwise, the exit status follows the BSD guideline outlined in
65 .B #include <sysexits.h>
66 if the error occured from within
68 or in case the chid process exits prematurely, its exit code is inherited. Notably, \fI69\fP is returned when the timeout is reached.
71 .\"EX_OK (0): successful termination
73 .\"EX_UNAVAILABLE (69): PROGRAM timed out
75 .\"EX_USAGE (64): command was used incorrectly (argument error)
77 .\"EX_OSERR (71): system error (can't fork, pipe, etc.)
79 .\"EX_IOERR (74): input/output error (e.g. can't read)
84 needs to be given as an integer; mnemonic should be supported in the future.
86 Sometimes, stdin behaves strange after the program terminates.
88 Please report bugs and patches to the issue tracker at https://github.com/girst/forkaftergrep/.
90 Some might find the name of this program offensive. Feel free to create a symlink or alias on your system.
92 Copyright 2017 Tobias Girstmair. This is free software; see https://www.gnu.org/licenses/gpl-3.0.html for conditions.
94 Tobias Girstmair (http://isticktoit.net)