blob: b5cfb14f86ce6582f1b04cf1d22fc890c49bc21a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# $OpenBSD: tk.pl,v 1.2 2001/01/29 01:58:48 niklas Exp $
# make sure every subprocess has it's exit and that the main one
# hasn't
sub fun {
unless ($pid = fork) {
unless (fork) {
use Tk;
$MW = MainWindow->new;
$hello = $MW->Button(
-text => 'Hello, world',
-command => sub {exit;},
);
$hello->pack;
MainLoop;
}
exit 0;
}
waitpid($pid, 0);
}
1;
|