Re: [dev] New utility "when"

From: Andrew Gwozdziewycz <>
Date: Thu, 12 Dec 2013 00:17:15 -0500

On Wed, Dec 11, 2013 at 11:53 PM, Patrick <> wrote:
> On 2013-12-11 22:46, Andrew Gwozdziewycz wrote:
>> On Wed, Dec 11, 2013 at 6:02 PM, Charlie Kester <> wrote:
>> > Maybe I'm have a dumb day (it happens, all too often), but is there a
>> > way to get the exit code of the longrunningscript in case it fails
>> > *after* the timebomb goes off?
>> There will be at some point tonight. Thanks for the suggestion! It was
>> on my list, but forgotten about.
> Isn't this rewriting /sbin/init? ;)

Isn't /bin/sh just /sbin/init? It launches processes, after all.

> It seems like there are two parts: IPC and process control. Shells offer
> both, however we want better semantics ("when ...").

I'd have loved to build the whole thing in shell. I consulted with a few bash
wizards, who stared blankly, or offered repulsive, hard to generalize
solutions. The solution in bash presented previously in the thread is not
something you can produce one off, requires temporary files, and is
in general about 100x more hacky then the couple hundred lines of C I've
written (which could be far less if I took out the crap that makes it nice to

If you don't agree with its utility, think it solves the wrong problem, or does
so in an idiotic way, good for you! I'd be happy to read and respond to
constructive criticism. I'm not, however, interested in getting into a pissing
match with a troll.

Received on Thu Dec 12 2013 - 06:17:15 CET

This archive was generated by hypermail 2.3.0 : Thu Dec 12 2013 - 06:24:07 CET