|
|
setting environment for nstask
|
|
|
|
Grizzled Veteran
Join Date: Feb 2001
Location: Germany
Status:
Offline
|
|
hi everybody,
i have this small app that reads in data from /bin/ps. ps by default limits its output width to the screen/window width. i tried setting the environment for the task that launches ps, but its output still gets truncated. the nsdictionary i hand to the task looks like this:
dict = [NSDictionary dictionaryWithObject:@"co#200:" forKey:@"TERMCAP"];
am i missing something fundamental?
|
|
|
|
|
|
|
|
|
Senior User
Join Date: Jan 2000
Status:
Offline
|
|
As a stopgap measure, you could pass the -w flag to ps before you launch the task, which will prevent truncation in most cases. Haven't tested it, but it seems reasonable.
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Feb 2001
Location: Germany
Status:
Offline
|
|
Originally posted by fitter:
<STRONG>As a stopgap measure, you could pass the -w flag to ps before you launch the task, which will prevent truncation in most cases. Haven't tested it, but it seems reasonable.</STRONG>
wow, thanks a lot!
in fact, specifying w once limits ps's output to 132 characters line width and specifying it more than once makes the output as wide as necessary. missed that in the man page.
still, out of curiosity, what did i do wrong in the example above?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|