• 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
piping a shell result to display it
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: piping a shell result to display it
      • From: Chris Ridd <email@hidden>
  • Prev by Date: Re: Line numbers and breakpoints
  • Next by Date: printing an NSTextView in smaller font and different colors?
  • Previous by thread: Re: Mimic Finder File Listing
  • Next by thread: Re: piping a shell result to display it
  • Index(es):
    • Date
    • Thread