[ANN] after gem released v 0.8.1

Hello all.
Happy to announce the release of “after” v0.8.1

After includes the “after” command line utility
which allows one to wait until a process in another terminal
window ends before starting one locally.

ex:

$ after long_process rm temp_file
or the like.

It has proven quite useful to me especially in the windows world that
doesn’t have as flexible of a “background process” for command line
apps.

Enjoy!
-roger

recent changes:
0.8.0
make prettier output
make it so it can enumerate all processes: ($ after -l)
make -v mode (more chatty) by default, add option -q for those that
want no output

On Oct 4, 2011, at 13:39 , Roger P. wrote:

After includes the “after” command line utility
which allows one to wait until a process in another terminal
window ends before starting one locally.

How is this different from unix’s wait?

After includes the “after” command line utility
which allows one to wait until a process in another terminal
window ends before starting one locally.

How is this different from unix’s wait?

I believe the wait command can only wait for child processes (correct me
if I’m wrong).

So “after” allows this. If this is the case then it also allows you to
not have to interrupt a running process to be able join on it to run a
command after it completes. It also allows you to “wait” from a
separate terminal window, if that’s convenient. Sometimes it is, if you
have flashing alerts setup or the like, and want to know when it’s
progressing from one to the next.
It’s also compatible with windows native processes, which was it’s
original motivation.
I don’t reach for it too often in Linux (though occasionally I do), but
do use it all the time in windows, which has fewer options available :slight_smile:

-=roger-

On Oct 5, 3:38pm, Ryan D. [email protected] wrote:

10000 % help wait
wait: wait [n]
Wait for the specified process and report its termination status. If
N is not given, all currently active child processes are waited for,
and the return code is zero. N may be a process ID or a job
specification; if a job spec is given, all processes in the job’s
pipeline are waited for.

Are you ignoring the Windows thing, or is this your way of telling him
to install cygwin?

On Oct 5, 2011, at 10:49 , Roger P. wrote:

not have to interrupt a running process to be able join on it to run a
command after it completes. It also allows you to “wait” from a
separate terminal window, if that’s convenient. Sometimes it is, if you
have flashing alerts setup or the like, and want to know when it’s
progressing from one to the next.
It’s also compatible with windows native processes, which was it’s
original motivation.
I don’t reach for it too often in Linux (though occasionally I do), but
do use it all the time in windows, which has fewer options available :slight_smile:

10000 % help wait
wait: wait [n]
Wait for the specified process and report its termination status.
If
N is not given, all currently active child processes are waited for,
and the return code is zero. N may be a process ID or a job
specification; if a job spec is given, all processes in the job’s
pipeline are waited for.

% help wait
wait: wait [n]
Wait for the specified process and report its termination status.
If
N is not given, all currently active child processes are waited for,
and the return code is zero. N may be a process ID or a job
specification; if a job spec is given, all processes in the job’s
pipeline are waited for.

Perhaps you can help me understand its use then. Not to be
argumentative, I’d be happy to be proven wrong here :slight_smile:

Background:

If I have a background process in a terminal, of PID 1714, then in that
same terminal, I run
$ wait 1714
it waits for PID 1714 to exit.

However if I go to a different terminal, and run the same, I get the
following:
$ wait 1714
bash: wait: pid 1714 is not a child of this shell

Am I misunderstanding?

-roger-

On Oct 5, 2011, at 12:43 , Yossef M. wrote:

to install cygwin?
Well, I’ll always ignore the windows thing. Installing cygwin is
certainly an option. But I think more importantly it is missing the
point that it is utterly useless outside of windows and it should make
that clear. This isn’t clear:

Hi,

On Thu, Oct 6, 2011 at 9:21 AM, Roger P. [email protected]
wrote:

% help wait

bash: wait: pid 1714 is not a child of this shell

Am I misunderstanding?

You are not.

Solaris has a command called pwait that serves a similar purpose:

http://www.solarisinternals.com/wiki/index.php/Processes#Wait_for_Process_Completion:_pwait

Jos