Created
October 31, 2017 07:22
-
-
Save binary-signal/4942dadde26466fbfa8c9c89192fd49e to your computer and use it in GitHub Desktop.
pid to file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def mark_me(main_file): | |
pid = os.getpid() | |
with open('proc.pid', "w") as f: | |
f.write("{} pid:{} ".format(os.path.basename(main_file), pid)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment