On Thu, Feb 04, 2016 at 12:00:00AM +0100, Bram Moolenaar wrote:

> > That's what
> > 
> >     let pid = system("./test_channel.py& echo $!")
> >     ...
> >     call system("kill " . pid)
> > 
> > was all about -- the script would emit the pid of the job running in the
> > shell, the vimscript would capture that, and then pass it to a kill
> > command.  That's about as precise as we can get, I think.
> 
> Nice solution.  Does that $! work with every shell?

Doesn't work with the very old csh on Solaris.  Tcsh supports it, as do
bash, zsh, and ksh (88 & 93).  No idea when it was introduced in each,
though if ksh88 has it, I suspect all the bourne shell derivatives do,
except maybe the original bourne shell itself.

I'm guessing that pretty much everyone using an operating system that has
pkill available will be using a shell with $!, except maybe some csh users.
Csh users can be really, really stubborn.  :)

But that's just a guess.

Danek

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui