strange subprocess behavior when calling ps

Cameron Simpson cs at zip.com.au
Thu Nov 18 00:16:28 CET 2010


On 16Nov2010 20:18, Ned Deily <nad at acm.org> wrote:
| In article 
| <55f26d5c-aba9-4892-9e2c-1caa9988e7fe at v23g2000vbi.googlegroups.com>,
|  Roger Davis <rbd at hawaii.edu> wrote:
| > I am running 2.6.6 under MacOS 10.6.4 on a MacBook Pro Intel. I have
| > appended the code below. I am running both commands directly in a
| > Terminal window running tcsh.
| 
| See "man compat".  What you are seeing is the difference between ps(1) 
| output in "legacy" mode, attempting to duplicate the old, non-POSIX 
| behavior from 10.3 days, or "unix2003" mode.  Terminal login sessions 
| are normally automatically started with the COMMAND_MODE environment 
| variable set:
| 
| $ echo $COMMAND_MODE 
| unix2003
| 
| Adding an "env={"COMMAND_MODE": "unix2003"}" argument to your subprocess 
| Popen call should do the trick.

For an added datum, my machine (MacOSX 10.6.5 Intel Macbook Air) says
"legacy" instead of "unix2003".
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

I understand a fury in your words, but not your words.  - William Shakespeare



More information about the Python-list mailing list