Re: Displaying top
Re: Displaying top
- Subject: Re: Displaying top
- From: email@hidden
- Date: Tue, 14 May 2002 08:25:30 -0700
Tim Anderson wrote:
|Since I can only have one NSTask running,
Why is this? NSTask has no such limit. (A given NSTask can be *run* only once, but you can have as many NSTasks hanging around as you like.)
|I'll let top run until the button is clicked, stop the top NSTask, create
|the new NSTask for kill, and then start top again.
This would be simpler if you used the kill() system call. You could then leave top running and not worry about starting and stopping tasks at all.
|The problem is that I can't get top to display. I've stripped out everything
|except the top-relevant code and it doesn't work. When I run the following
|code, all I get to display in textview is the string "can't get terminal
|attributes."
Top uses environment variables (TERM and TERMCAP, at the least, I suspect) to determine the terminal type and characteristics. Are you copying the environment variables from your process to the "top" process? (I haven't looked at Moriarity, so I don't know whether it shows how to do that.)
Glen Fisher
_______________________________________________
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.