Skip Menu |

This queue is for tickets about the POE CPAN distribution.

Report information
The Basics
Id: 12953
Status: resolved
Priority: 0/
Queue: POE

People
Owner: Nobody in particular
Requestors: x11 [...] kitas.arturas.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Date: Wed, 25 May 2005 14:00:56 +0300
From: Artūras Šlajus <x11 [...] kitas.arturas.net>
To: bug-POE [...] rt.cpan.org
Subject: POE bug when catching signals
The folowing code produces error when ctrl+c is pressed: $poe_kernel->sig(INT => 'sigint'); $poe_kernel->sig(TERM => 'sigint'); $poe_kernel->state('sigint', sub { print 'foo'; } ); Please mail the following information to bug-POE@rt.cpan.org: internal inconsistency (POE::Kernel=ARRAY(0x8421950)/POE::Session=ARRAY(0x87f5790)) at /usr/share/perl5/POE/Resource/Sessions.pm line 146 POE::Kernel::_data_ses_free('POE::Kernel=ARRAY(0x8421950)', 'POE::Session=ARRAY(0x87f5790)') called at /usr/share/perl5/POE/Resource/Sessions.pm line 507 POE::Kernel::_data_ses_stop('POE::Kernel=ARRAY(0x8421950)', 'POE::Session=ARRAY(0x87f5790)') called at /usr/share/perl5/POE/Resource/Signals.pm line 269 POE::Kernel::_data_sig_free_terminated_sessions('POE::Kernel=ARRAY(0x8421950)') called at /usr/share/perl5/POE/Kernel.pm line 997 POE::Kernel::_dispatch_event('POE::Kernel=ARRAY(0x8421950)', 'POE::Kernel=ARRAY(0x8421950)', 'POE::Kernel=ARRAY(0x8421950)', '_signal', 16, 'ARRAY(0x85bad40)', '/usr/share/perl5/POE/Loop/PerlSignals.pm', 31, 1117018903.01127, ...) called at /usr/share/perl5/POE/Resource/Events.pm line 246 POE::Kernel::_data_ev_dispatch_due('POE::Kernel=ARRAY(0x8421950)') called at /usr/share/perl5/POE/Loop/Select.pm line 325 POE::Kernel::loop_do_timeslice('POE::Kernel=ARRAY(0x8421950)') called at /usr/share/perl5/POE/Loop/Select.pm line 333 POE::Kernel::loop_run('POE::Kernel=ARRAY(0x8421950)') called at /usr/share/perl5/POE/Kernel.pm line 1072 POE::Kernel::run('POE::Kernel=ARRAY(0x8421950)') called at ./pl6tunnel line 112 Died at /usr/share/perl5/POE/Kernel.pm line 321.
[x11@kitas.arturas.net - Wed May 25 07:07:47 2005]: Show quoted text
> The folowing code produces error when ctrl+c is pressed: > $poe_kernel->sig(INT => 'sigint'); > $poe_kernel->sig(TERM => 'sigint'); > $poe_kernel->state('sigint', sub { > print 'foo'; > } );
Can you use this code in a short test case? It would help a lot. -- Rocco Caputo
From: Art&#363;ras Šlajus
[RCAPUTO - Sat May 28 10:47:00 2005]: Show quoted text
> Can you use this code in a short test case? It would help > a lot.
#!/usr/bin/env perl use strict; use warnings; use diagnostics; use POE; $|++; $poe_kernel->sig(INT => 'sigint'); $poe_kernel->state('sigint', sub { print 'foo'; } ); POE::Session->create( inline_states => { _start => sub { $_[KERNEL]->yield('do_nothing'); }, do_nothing => sub { print '.'; sleep 1; $_[KERNEL]->yield('do_nothing'); } } ); $poe_kernel->run; Pressing CTRL+C crashes the kernel.
[guest - Sat May 28 11:08:46 2005]: Show quoted text
> [RCAPUTO - Sat May 28 10:47:00 2005]: >
> > Can you use this code in a short test case? It would help > > a lot.
[short test case omitted] This has been attached as a release goal to POE 0.32. Thanks!
The fix for this issue has been committed to CVS. It will appear in the next release of POE. Thanks for the report and test case!