9978Re: mvim on file with path
- Feb 17, 2009
>>> Nico, I prepared a patch but I'd appreciate it if you'd look over itAlright, I took a short look at this.
>>> before I merge.
>> Did you attach the patch? I can't see it.
> Geez...I _was_ a bit tired when I posted that. Here we go again
> (still tired, but lets hope I get it right).
First a few comments just from looking at the diffs:
I'm not sure about this part:
- /* os x doesn't really support fork(), so we can't fork of a
- * in an already running vim. see gui_start() for more details.
- gui.dofork = FALSE;
iirc, this made sure -f is ignored if passed to `:gui` as documented a
`:h :gui`. It should probably stay in. Ah, wait, you don't define
MAY_FORK on OS X at all, so this _can_ probably stay out. Just take
another look if that's true :-)
+ if (gui.dofork)
Add a "/* does not return */" comment to the call to macosx_fork().
+ * Kinda sucks to restart vim when doing :gui, so don't fork in
+ * case (make sure gui.dofork is only set when interpreting argv,
+ * when doing :gui. Currently, gui.dofork is set to false in
The "restart" part is no longer really true. And this part of the
comment should perhaps be in gui.c, possibly in ex_gui(). Also, a
closing paren is missing :-P
+ * Also doesn't work well if vim starts cscope (or some other
+ * subprocess I guess), because it's not transferred to the newly
+ * exec'd process, leaving an orphaned process (not a zombie
+ * behind. The Right Thing is to kill all our child processes
+ * calling exec.
This is no longer true too, because we now fork before cscope and
friends are started. You can probably just delete this paragraph.
Now some testing…hm, looks as if weird things happen if I start MacVim
in terminal mode (`build/Release/MacVim.app/Contents/MacOS/Vim`). You
probably need to check if gui mode should be started in main, like this:
+ if (gui.starting && gui.dofork)
That seems to fix this particular problem. I can't find other problems
(at least not no new ones: If you start in terminal mode, then do
`:gui`, then hit ctrl-z in terminal, followed by `bg`, and then close
the terminal, you get a DEAD_PROCESS in console, but that does
currently happen too, and is not really a problem anyway). I didn't
try _very_ hard, but I guess the patch is good enough for wider testing.
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
- << Previous post in topic Next post in topic >>