I am launching an app from a script using:
open /path/to/foo.app -F -g -W --args -foo bar
When the application crashes (in particular, it seg faults), the window sits open forever and the app does not exit. However, when I launch the app the old fashioned way
/path/to/foo.app/Contents/MacOSX/foo -foo bar
it simply exits and returns a nonzero error code to the script, which is what I want. How can I get this behaviour (exit on seg fault and return an error code) using the "open" syntax above? The motivation is to get access to OSX-specific options such as -F, -g, -W etc.