popen writes to a shell but wont read

dave dave at me.here
Tue Jan 29 19:24:02 EST 2002


Im trying to use popen3 to read and write to s shell process. The write
bit seems to complete but the read doesnt return. looks like blocking
but using '`b' in popen makes no difference either.

"
    #invoke a root shell
    whoami=string.strip(os.popen(luser).read())
    if whoami != 'root':
        w,r,e =os.popen3(rootshell) #w,r,e order makes no difference
    try:
        w.write(passwd)
    except Exception, ex:
        raise Exception, ex+"password failure"
    print r.read() #waits here forever
"

______________________________________________________________________
Posted Via Uncensored-News.Com - Still Only $9.95 - http://www.uncensored-news.com
   With NINE Servers In California And Texas - The Worlds Uncensored News Source
  



More information about the Python-list mailing list