Think before you speak, read before you think.

python打印pid

by

in
$ python
>>> import os
>>> os.getpid()
12252

参考:
http://stackoverflow.com/questions/8281345/how-to-get-current-linux-process-id-pid-from-cmdline-in-shell-and-language-i


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *