Here's a bizarre situation: I am running a bundled BSD binary via a NSTask. About 50% of the time, the subprocess bombs out with a SIGSEGV (my main app keeps running). What's interesting is even when I am using identical arguments, it will run with 100% success from the command line.
I'm fairly sure that it's some incompatibility in the code of the BSD binary, but why would it only show up when run as a NSTask? This seems counter-intuitive to me. Therefore my question is, what strange things could the NSTask be doing that would cause the subprocess to occasionally bomb?