gomd-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gomd-devel] <DAEMON>_ child-process TTL in execCommandAndGetChildOutput


From: Gian Paolo Ghilardi
Subject: [gomd-devel] <DAEMON>_ child-process TTL in execCommandAndGetChildOutput() function
Date: Sun, 4 Jan 2004 00:20:12 +0100

Hi all.

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?

CU.

Byez.

<rejected>


<< CVS NOTES >>

IN constants.h
(+) added PROCESS_TIME_TO_LIVE constant (set to 30)

IN utils.cpp
(+) 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]