1

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.

1 Answer 1

0

I would avoid using the -W option. From open's man page:

-W Causes open to wait until the applications it opens (or that were already open) have exited. Use with the -n flag to allow open to function as an appropriate app for the $EDITOR environment vari- able.

This could be your issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .