Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > SIGSEGV on NSTask subprocess

SIGSEGV on NSTask subprocess
Thread Tools
matthewmodern
Junior Member
Join Date: Nov 2000
Location: Manhattan
Status: Offline
Reply With Quote
Mar 8, 2002, 10:46 PM
 
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?
     
lindberg
Dedicated MacNNer
Join Date: Jan 2001
Location: Virginia, US
Status: Offline
Reply With Quote
Mar 9, 2002, 01:26 PM
 
Your environment might be different. Anything you do in your .cshrc (or similar) will be available to your command-line launch, but not to the NSTask launch (if you're launching the NSTask from a GUI program anyways).

A task launched from a GUI app also won't have a tty... is the BSD tool reading from stdin at any point?
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 09:30 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,