I'm using a vte term to run a bash script
self.child_pid = self.v.fork_command(None, ['/bin/bash', 'dPluzz-cli', dest, '-u', adresse])
How can I do to get the number of the pid ? I tried
os.getpid()
but the pid is the number of my python program..
Thanks!
Solved...
id = self.child_pid
Old question, instead of fork_command you now need
spawn_sync
:https://lazka.github.io/pgi-docs/Vte-2.91/classes/Terminal.html#Vte.Terminal.spawn_sync
spawn_sync
returns atuple
, second element is pid.