pid of the current proc
Posted: Thu Mar 13, 2008 4:19 pm
Is there any way of intuiting the pid of the current process? If not, Lutz, is it possible to add this?
Friends and Fans of newLISP
http://www.newlispfanclub.alh.net/forum/
http://www.newlispfanclub.alh.net/forum/viewtopic.php?f=5&t=2200
Code: Select all
> (import "libc.dylib" "getpid")
getpid <951021A4>
> (getpid)
1476
>
Code: Select all
newLISP v.9.3.4 on OSX IPv4 UTF-8, execute 'newlisp -h' for more info.
> (sys-info -3)
2054
> (fork (println "pid:" (sys-info -3)))
2055
> pid:2055
> (sys-info -3)
2054
> (sys-info)
(366 268435456 362 1 0 2048 2054 9304 131)
>