[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

RE: script timer



On Mon, 9 Aug 1999, Chakrabarti, Suvendra (CTS) wrote:

>      Hi Binand,
> 
>      Only zombies are not left as exercise here. ;-)
> 
>      1. sleep(5) is not a very good option. This command will keep the
> system resources
>          busy. A better alternative will be trapping the signal SIG_ALARM.
> 
>      2. Trying to fork() every 5 seconds and spawning a new process !!! That
> is
>          not decent in any sense. A simple system("cmd_line") should have
>          sufficed in this case, assuming the program does not take more than
>          5 seconds to execute.
> 
>          OK, can we leave these also as exercises ? *sorry Binand, not for
> you*
> 
>          Suvendra
> 

The system function does exactly what Binanad did in his C snippet.
(Fork & exec)
Instead of using a Function call,he did better of using a System
call, i think.

sudheer


- --------------------------------------------------------------------
For more information on Linux in India visit http://www.linux-india.org/
The Linux India mailing list does not accept postings in HTML format.

------------------------------