Re: "extern int errno" was deprecated 2 years before "djbdns" was even written

Laurent Bercot <[email protected]>
Newsgroups gmane.comp.djb.syslog
Message-ID <[email protected]>
>> the elegance of a service/run script containing "sleep 60; exec
>> <something_that_exits_when_done> ..." for periodic jobs cannot be
>> beat.
> 
> <plug>
> I daresay it can, by just a bit:
> exec \
> rw-add n d60S waketime \
> rw-sleep \$waketime \
> ...

 Simpler with the same advantage: "do-the-job ; exec sleep 60".
That way, you can wake it up early with "svc -t the-service", and you
don't even need runwhen. Drawback : you can't send signals to do-the-job
with svc, but it would be a risky business anyway (do-the-job is supposed
to be short-lived).

<plug mode="too">
 And, whether you use runwhen or not, you can even spare the cost of
spawning a shell: http://www.skarnet.org/software/execline/
</plug>

-- 
 Ska
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.