Jump to content
Sign in to follow this  
gaurav

accessing PID from the running session

Recommended Posts

Hi Guys,

To avoid guesswork from multiple open session with %>ps -a | grep .....

How do you access PID of  a session *Being inside the same session* ?  Tried looking for env var in %>hconfig -a with little luck.

 

Thanks,

Edited by gaurav

Share this post


Link to post
Share on other sites

Python:

from os import getpid
pid = getpid()

Hscript (copied from flipbook session menu):

`pythonexprs("__import__('os').getpid()")`

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×