Loading ...
Sorry, an error occurred while loading the content.

forking in OS X (Jaguar)

Expand Messages
  • Benji Fisher
    ... That s what I thought. So we have the same options (fork and don t fork) but we get them in a strange way (with or without & instead of without or with
    Message 1 of 1 , Feb 11 1:48 PM
    • 0 Attachment
      Gregory Seidman wrote:
      > Benji Fisher sez:
      >
      > } If I run vim in the background, with
      > }
      > } % /Applications/vim/Vim.app/Contents/MacOS/Vim -g &
      > }
      > } then the Terminal is ready for new commands, and Vim comes into focus,
      > } which is what I usually want. If I do not run it in the background,
      >
      > But you shouldn't need the &, it should Just Do It. This is the expected
      > behavior withou the -f flag.
      >
      > } % /Applications/vim/Vim.app/Contents/MacOS/Vim -g
      > }
      > } then the terminal waits for Vim to finish. Is this different from not
      > } forking? More to the point: is there a problem? For example, I have
      > } not tried calling Vim from a mail program or anything that expects Vim
      > } to finish before doing more work.
      >
      > This is exactly not forking. This is the expected behavior with the -f
      > flag.

      That's what I thought. So we have the same options (fork and
      don't fork) but we get them in a strange way (with or without & instead
      of without or with -f). My question stands: is this a problem?

      Since my attempt to get gvim, view, etc. by making (symbolic or
      hard) links failed, perhaps we should go back to my original suggestion.
      With appropriate aliases or shell-script wrappers, we should be able
      to get the expected behavior by using or not using -f . That is, make
      gvim a little executable shell script that processes the -f flag (and
      appends & or not) and passes the rest of the arguments to MacOS/Vim .

      --Benji Fisher
    Your message has been successfully submitted and would be delivered to recipients shortly.