Pexpect getting a defuct process

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Baillargeon, Sonny

    #1

    Pexpect getting a defuct process

    I am trying to use a pexpect script using python v2.3.4 with pexpect
    module .999 on Solaris 8.

    I try to execute this script.

    #!/usr/bin/env python
    '''This runs "ls -l" on a remote host using SSH.
    At the prompts enter hostname, user, and password.
    '''
    import pexpect

    logfile = open('sshls.log ', 'w')

    child = pexpect.spawn(' ssh user@server ls -la')
    child.setlog(lo gfile)
    child.setmaxrea d(1000)
    child.expect(pe xpect.EOF, timeout=180)
    print child.before

    This used to work before but now I get a defunct process after it runs.
    Any ideas?

    Thanks,
    Sonny


    <FONT SIZE = 1>************* *************** *************** *************** *************** ***
    This e-mail and any attachments may contain confidential and privileged information. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this e-mail and destroy any copies. Anydisseminatio n or use of this information by a person other than the intended recipient is unauthorized and may be illegal. Unless otherwise stated, opinions expressed in this e-mail are those of the author and are not endorsed by the author's employer.</FONT>

  • Jorge Luiz Godoy Filho

    #2
    Re: Pexpect getting a defuct process

    Baillargeon, Sonny, Terça 04 Janeiro 2005 14:42, wrote:
    [color=blue]
    > This used to work before but now I get a defunct process after it runs.
    > Any ideas?[/color]

    "before" what? What has changed in your environment to make it stop
    working?

    --
    Godoy. <godoy@ieee.org >

    Comment

    Working...