File: rt23181-sigchld-rc.t

package info (click to toggle)
libpoe-perl 2%3A1.3670-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,996 kB
  • ctags: 1,416
  • sloc: perl: 22,865; makefile: 9
file content (28 lines) | stat: -rw-r--r-- 578 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!perl
# vim: ts=2 sw=2 filetype=perl expandtab

# Calling sig_child($pid) without a prior sig_child($pid, $event)
# would drop the session's reference count below zero.

use warnings;
use strict;

use Test::More tests => 1;
sub POE::Kernel::ASSERT_DEFAULT () { 1 }

BEGIN {
  package POE::Kernel;
  use constant TRACE_DEFAULT => exists($INC{'Devel/Cover.pm'});
}

use POE;

POE::Session->create(
	inline_states => {
		_start => sub { $_[KERNEL]->yield("test") },
		test   => sub { $_[KERNEL]->sig_child(12) },
		_stop  => sub { pass("didn't die") },
	}
);

POE::Kernel->run();