1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-25 11:37:56 +00:00
freebsd/contrib/nvi/perl_scripts/tk.pl
Peter Wemm b8ba871bd9 Import of nvi-1.79, minus a few bits that we dont need (eg: postscript
files, curses, db, regex etc that we already have).  The other glue will
follow shortly.

Obtained from: Keith Bostic <bostic@bostic.com>
1996-11-01 06:45:43 +00:00

21 lines
432 B
Perl

# 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;