Re: get the pid of a process with pexpect

2008-05-06 Thread Karim Bernardet
me.sleep(172800) in the bash script which calls mytunnel.py : ./mytunnel.py ${USERN} ${HMM} ${P2USE} ${p2use2} & echo $! >>pids this way I have all the pids Cheers ! Noah wrote: On May 5, 7:18 am, Karim Bernardet <[EMAIL PROTECTED]> wrote: ssh_tunnel = pexpect.spawn (tunnel_co

get the pid of a process with pexpect

2008-05-05 Thread Karim Bernardet
Hi I am using pexpect to do ssh tunneling and to open a vnc server (jobs on a grid cluster). When the job is canceled, these 2 processes remain on the worker node (they are detached), so I have to kill them (using a trap command in the bash script of the job) but I need the pid of each proces