Ticket #1564 (closed feature: done)
expose a getpid library function for Rakudo $*PID and other languages
Reported by: | mberends | Owned by: | NotFound |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | core | Version: | trunk |
Severity: | medium | Keywords: | process ID pid getpid |
Cc: | Language: | perl6 | |
Patch status: | Platform: | all |
Description
Please enable language implementations to read the ID of the running Parrot process. Coke++ implemented it in partcl with an "evil" workaround:
http://github.com/partcl/partcl/blob/master/runtime/builtin/pid.pir
In Windows the lib should not be null, it should get the loadlib 'kernel32' result, and the function name is '_getpid' instead of 'getpid'.
The idea was discussed during about an hour from http://irclog.perlgeek.de/parrot/2010-04-19#i_2242886
The Rakudo file src/cheats/setup-io.pm intends to use this function. In the meantime, it may get by with a workaround similar to the one in partcl.
Change History
Note: See
TracTickets for help on using
tickets.