If you have the ability to attach a debugger like gdb to the process, then you can look at the value of the PL_evalseq variable (or on a threaded Perl, the value of my_perl->Ievalseq). For example in the following, perl588 and perl588t are unthreaded and threaded versions of perl:
$ perl588 -e 'eval "1;" for 1..10; sleep 9999' &
[1] 8491
$ gdb `which perl588` 8491
...
(gdb) p PL_evalseq
$1 = 0xa
(gdb) quit
$ perl588t -e 'eval "1;" for 1..10; sleep 9999' &
[1] 8525
$ gdb `which perl588t` 8525
...
(gdb) bt
#0 0x00110402 in __kernel_vsyscall ()
#1 0x003f2e20 in __nanosleep_nocancel () from /lib/libc.so.6
#2 0x003f2c6f in sleep () from /lib/libc.so.6
#3 0x08133397 in Perl_pp_sleep (my_perl=0x8837008) at pp_sys.c:4589
...
(gdb) frame 3
(gdb) p my_perl->Ievalseq
$1 = 0xa
(gdb)
Dave.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.