Re: Launch a background task
Re: Launch a background task
On Sun, Jun 02, 2002 at 09:55:48PM +0200, Arthur VIGAN wrote:
>
Note: the script work fine from the terminal, so the error doesn't come from
>
the script.
well, it worked for me even without the ! being replaced, that was just a test.
Here's what I tried:
[p3:5009] ~%ls -l blah.sh ; cat blah.sh 3:28PM
-rwx------ 1 nicholas staff 22 Jun 2 15:26 blah.sh*
#!/bin/sh
echo "HI"
[p3:5012] ~Ęt test/main.m 3:29PM
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSTask *scriptTask = [[NSTask alloc] init];
[scriptTask setLaunchPath:@"~/blah.sh"];
[scriptTask launch];
[pool release];
return 0;
}
[p3:5013] ~%./test/build/test 3:29PM
[p3:5014] ~%HI 3:29PM
so, you should start from there and see what you're doing wrong.
--
=Nicholas Riley <email@hidden> | <
http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.