[Re] euid/egid eaten up by os.popen
Donn Cave
donn at u.washington.edu
Thu Jul 25 18:15:42 EDT 2002
Quoth janeaustine50 at hotmail.com (Jane Austine):
| >I bet you're running Linux. My suggestion is to try popen2, and
|
| Yes, Red Hat 7.3
|
|> specify the command as a list of arguments. For example, if you
|> have been writing
|> fp = os.popen('id')
|> then try
|> fp, ignore = popen2.popen2(['id'])
|
| Have done that and it didn't work still.
...
| It seems like when popen forks for a new shell, euid is all cleared.
Yes, I think it's the shell, all right. All I can say is, popen2()
works for me - *IF* I use the list of parameters as above. It doesn't
help to just use popen2 instead of popen, and give it the same command
string.
Donn Cave, donn at u.washington.edu
More information about the Python-list
mailing list