piping a shell result to display it
piping a shell result to display it
- Subject: piping a shell result to display it
- From: Jean-Baptiste LE STANG <email@hidden>
- Date: Wed, 14 May 2003 16:52:16 -0700
This is the first time i'm writting an application. i'm trying to make
a small palette that would allow me to start/stop Apache Web Server
with a click in it. I'm also trying to log the result of the shell
script that start/stop the Web Server. this is what i'm doing :
NSLog(@"restart");
char* args[2];
err = 0;
FILE* iopipe;
iopipe = fopen("log.txt","a+");
fclose(iopipe);
args[0] = "restart";
args[1] = NULL;
err =
AuthorizationExecuteWithPrivileges(authorizationRef,"/usr/sbin/
apachectl",0, args, &iopipe);
But there is nothing in the "log.txt" file. What I am doing wrong here?
TIA, JB
_______________________________________________
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.