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="Luke, post: 4553944"] Hey John, Thanks for the response. I'm using open in the example that I provided, but open actually spawns a new process outside of Ruby and I can't figure out how to tell when the launched application is closed. Basically, the IO.popen("open -a #{some_app}") call gives me a handle to the "open" process which is disconnected from the process that I'm actually interested in. It seems to do the same thing as: sh ./some_app & Is there some way to tell "open" that I want the process initiated and "blocked"? Gary, Thanks for the heads up on the AppleScript gem, I checked that out also and had some problems because I'm trying to deploy a cross- platform gem and creating a dependency on those tools looked like they may cause problems for win users. Gem auto-unpacked the exts when it was resolving dependencies. The closest thing I've come up with so far is initiating the process with "open" and then using "ps -a" and regex to poll for the status of the launched process. This is definitely pretty far from ideal, so I would be surprised if that's what it's going to take. Any ideas? Thanks, Luke Bayes [URL="http://www.asunit.org"]www.asunit.org[/URL] [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
How do I properly spawn an external process on OS X from Ruby?
Top