#1817: Cannot get the PID on Mac OS X
--------------------+-------------------------------------------------------
Reporter: masak | Owner: dukeleto
Type: bug | Status: assigned
Priority: normal | Milestone:
Component: none | Version: 2.8.0
Severity: medium | Keywords:
Lang: | Patch:
Platform: darwin |
--------------------+-------------------------------------------------------
Changes (by dukeleto):
* owner: => dukeleto
* status: new => assigned
Comment:
I will see if I can write a test for this that fails on OS X.
The relevant part of generated PIR code is:
{{{
.HLL "perl6"
.namespace []
.sub "_block78" :anon :subid("65_1286388210.17692")
:outer("64_1286388210.17692")
.param pmc param_87 :optional
.param int has_param_87 :opt_flag
.annotate 'line', 1
.local pmc true
true = get_hll_global 'True'
.lex "__CANDIDATE_LIST__", $P80
find_lex_skip_current $P81, "$_"
$P82 = new ['Perl6Scalar'], $P81
setprop $P82, "rw", true
.lex "$_", $P82
find_lex_skip_current $P83, "$/"
$P84 = new ['Perl6Scalar'], $P83
setprop $P84, "rw", true
.lex "$/", $P84
find_lex_skip_current $P85, "$!"
$P86 = new ['Perl6Scalar'], $P85
setprop $P86, "rw", true
.lex "$!", $P86
if has_param_87, optparam_69
new $P88, "Integer"
assign $P88, 0
set param_87, $P88
optparam_69:
.lex "$MAIN", param_87
$P0 = find_dynamic_lex "$*CTXSAVE"
if null $P0 goto ctxsave_done
$I0 = can $P0, "ctxsave"
unless $I0 goto ctxsave_done
$P0."ctxsave"()
ctxsave_done:
$P0 = get_hll_global "@!recapture"
recapture_loop:
unless $P0 goto recapture_loop_end
$P1 = shift $P0
fixup_outer_ctx $P1
goto recapture_loop
recapture_loop_end:
$P89 = "!find_contextual"("$*PID")
$P90 = "&say"($P89)
.return ($P90)
.end
}}}
Somehow,
{{{
$P89 = "!find_contextual"("$*PID")
}}}
is returning 0, either because find_contextual has a bug or $*PID never
gets set correctly on darwin.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1817#comment:1>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets