Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
How do I properly spawn an external process on OS X from Ruby?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="has, post: 4553998"] OS X's GUI and CLI environments have distinctly different ways of doing business and don't integrate too well out of the box, so conventional Unixisms like fork, argv and kill tend not to go down so well with GUI apps (as you've noticed). The standard API for launching apps and opening documents is LaunchServices and IPC is normally done via Apple events, but if Mac-specific C extensions are out then I think you're about down to kludging it. See also 'osascript', which can be used to execute AppleScripts on the fly. One other thing to remember: as a rule, OS X shouldn't have more than one instance of a given application running at a time (it's technically possible, but is largely frowned upon). Aside from being another reason not to mess about with fork; this also means it's normally pretty safe to identify apps by bundle id/bundle path (or even file name), so obtaining and working with a process id generally isn't essential. HTH has [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
How do I properly spawn an external process on OS X from Ruby?
Top