Danek Duvall wrote: > > > On Wed, Feb 03, 2016 at 09:33:00PM +0100, Bram Moolenaar wrote: > > > > > > > > Lcd wrote: > > > > > > > > > On 3 February 2016, Jun T. <takimot...@kba.biglobe.ne.jp> wrote: > > > > > > > > > > > > On 2016/02/03, at 19:04, Jun T. <takimot...@kba.biglobe.ne.jp> > > > > > > wrote: > > > > > > > > > > > > > call system("killall test_channel.py") this doesn't work either, > > > > > > > because the name of the process is not 'test_channel.py' but > > > > > > > 'python'. > > > > > > > > > > > > I forgot to mention that killall works on Linux. killall on Mac (and > > > > > > maybe on many non-linux systems) is not so clever. > > > > > > > > > > pkill(1) should work on (recent) Linux, *BSD, OS-X, and Solaris. > > > > > > > > Thanks for the hint. "pkill --full test_channel.py" should work. > > > > I'll add a check for "pkill". I'll assume they all have the --full > > > > argument. > > > > > > Not on Solaris, which has just -f for that. > > > > OK, let's use "pkill -f" then. > > > > > Is there a reason that grabbing the pid and killing that directly wasn't > > > appropriate? Do not all shells support $!? > > > > We don't have the PID (yet). > > 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? -- I'm writing a book. I've got the page numbers done. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- 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 vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.