Re: How to know if the System Preferences app is running
Re: How to know if the System Preferences app is running
- Subject: Re: How to know if the System Preferences app is running
- From: "Clark S. Cox III" <email@hidden>
- Date: Tue, 26 Nov 2002 14:34:52 -0500
On Tuesday, Nov 26, 2002, at 13:04 US/Eastern, TACKEL wrote:
PS - Although it's not important using NSTask, the "grep" command I
run inside
the task doesn't work. Do you know how I could run it? Is it necessary
to create
another task and pipe both tasks?
[checkTask setLaunchPath: @"/usr/bin/top"];
[checkTask setArguments:
[NSArray arrayWithObjects: @"-l1", @"|", @"grep", @"System\\ Pre",
nil]];
Yes, in this code, when top executes, it's argv looks like this:
argv[0] = "/usr/bin/top"
argv[1] = "|"
argv[2] = "grep"
and so on.
In other words, you are passing "|" as an argument, not as a command
to the shell.
_______________________________________________
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.