> I just updated to the latest trunk and built a new MacVim from source
> (as I always do). Now the system() function doesn't work properly when
> using "Launch Vim processes in a login shell".

The system() function and 'Launch Vim processes in a login shell' *should*
be completely unrelated.

> If this option is
> activated, system commands that really do work, e.g.:
> 
>     :echo system("ls")
> 
> Outputs:
> 
>     Command terminated
>     [.. ls of my home dir..]
> 
> , and v:shell_error is set to -1. system() works fine if I turn the
> option off, or revert to my older MacVim build.

Hmm. I don't see the problem with system('ls') but I did attempt to do
:hardcopy recently and I thought it used to work, but it seems to have
stopped with a similar problem.

O, actually, take that back...I bet I know what's happened...let me
test...

Now let me patch MacVim and see if I can fix it...

Yep. The patch below says it all, really.

Ben.



diff -r 3e5d016ea028 src/MacVim/MMAppController.m
--- a/src/MacVim/MMAppController.m      Sun Nov 16 03:34:04 2008 +1100
+++ b/src/MacVim/MMAppController.m      Tue Nov 18 03:30:10 2008 +1100
@@ -1997,6 +1997,11 @@
          return -1;
      } else if (pid == 0) {
          // Child process
+
+       // We need to undo our zombie avoidance as Vim waits for and needs
+       // the exit statuses of processes it spawns
+       signal(SIGCHLD, SIG_DFL);
+
          if (close(ds[1]) == -1) exit(255);
          if (dup2(ds[0], 0) == -1) exit(255);



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to