diff --git a/doc/trigger-listen.txt b/doc/trigger-listen.txt index 86b75cd..03ce9b7 100644 --- a/doc/trigger-listen.txt +++ b/doc/trigger-listen.txt @@ -52,7 +52,10 @@ Wait at least +_interval_+ seconds between executions of it receives a trigger pull within +_interval_+ seconds of the last execution, +trigger-listen+ executes +_prog_+ when +_interval_+ -seconds have elapsed. The default value of +_interval_+ is 0. +seconds have elapsed. This will not delay the first execution of ++_prog_+, so if the first trigger pull is within +_interval_+ +seconds of startup +_prog_+ will execute immediately unless -1 was +specified. The default value of +_interval_+ is 0. +-g _gid_+:: Switch group ID to +_gid_+ after preparing to receive trigger pulls. diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000..62f3e98 --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,21 @@ +chkshsgr +choose +compile +hasflock.h +hasmkffo.h +hassgact.h +hassgprm.h +hasshsgr.h +haswaitp.h +home +iopause.h +load +makeinclude +makelib +makescrip +select.h +systype +trigger-listen +trigger-pull +trigger-wait +uint64.h diff --git a/src/trigger-listen.c b/src/trigger-listen.c index be50957..afc96b7 100644 --- a/src/trigger-listen.c +++ b/src/trigger-listen.c @@ -193,12 +193,13 @@ int main(int argc,char * const *argv) { strerr_die2sys(111,FATAL,"unable to set uid: "); printstatus(); - if (flag1) doit(argv); - flagqueue = 0; taia_now(&resume); - taia_uint(&deadline,interval); - taia_add(&resume,&resume,&deadline); + if (flag1) { + doit(argv); + taia_uint(&deadline,interval); + taia_add(&resume,&resume,&deadline); + } for (;;) { sig_unblock(sig_child);