• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask


  • Subject: Re: NSTask
  • From: Nick Zitzmann <email@hidden>
  • Date: Wed, 12 Jan 2005 16:13:42 -0700


On Jan 12, 2005, at 3:24 PM, Mai Bui wrote:

TestProg runs ok alone, but when I run "MyApp", I got err:
	Executable “MyApp” has exited due to signal 10 (SIGBUS)

What did I do wrong?

Here's what you did wrong:

[task setArguments:[NSArray arrayWithObjects:@"5"]];

You need to nil-terminate the argument list when calling -[NSArray arrayWithObjects:], although in this case you should probably use -arrayWithObject: instead. If you don't add a nil-terminator to a call to -arrayWithObjects:, then the application will crash.


Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Question about an NSScanner loop (From: Matt Crocker <email@hidden>)
 >NSTask (From: Mai Bui <email@hidden>)

  • Prev by Date: RE: Question about an NSScanner loop
  • Next by Date: Re: Cocoa/Objective-C's Relative Performance
  • Previous by thread: NSTask
  • Next by thread: Re: Question about an NSScanner loop
  • Index(es):
    • Date
    • Thread