[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gomd-devel] <DAEMON>_ child-process TTL in execCommandAndGetChildOutput
Gian Paolo Ghilardi
[gomd-devel] <DAEMON>_ child-process TTL in execCommandAndGetChildOutput() function
Sun, 4 Jan 2004 00:20:12 +0100
First of all: HAPPY NEW YEAR!!! :)))
I've added a TTL for (invoked) commands that take a long time to complete
(option => "exec [cmd/cwc] COMMAND LIST_OF_PARAMS"].
Now if the invoked command takes a time >=PROCESS_TIME_TO_LIVE seconds
(default=30), its process will be automagically killed (obviously its
output, collected 'till that moment, will be returned to the client).
As you can see, the output of the (local or remote) command is "delayed",
returned _after_ its process ends (so the command finished or it was killed
because it takes too secs to complete).
Does anybody prefer _real-time_ output for invoked commands?
<< CVS NOTES >>
(+) added PROCESS_TIME_TO_LIVE constant (set to 30)
(+) added child-process time-to-live handling in
execCommandAndGetChildOutput() function: if you invoke a command that takes
a long time (>= PROCESS_TIME_TO_LIVE seconds), the process will be
automagically killed and its ouput returned to the client.
(+) added sigAlarmHandler() function to handle SIGVTALRM signal (raised when
the child-process TTL expires)
(+) added lots of comments
(+) some cleanups
- [gomd-devel] <DAEMON>_ child-process TTL in execCommandAndGetChildOutput() function,
Gian Paolo Ghilardi <=