From: Luke Date: 2007-03-23T13:25:07+09:00 Subject: Re: How do I properly spawn an external process on OS X from Ruby? > On Mar 22, 7:38 pm, John Joyce wrote: > also there is a command line tool in OS X called (of all things) open 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 www.asunit.org