while (1) { # Loop other processing here. load_file($this_file); reap_children(); } sub load_file() { my $childProcess; $childProcess = fork(); unless($childProcess) { # Child process so lets exec the loader. exec("loader $this_file"); exit 0; } } sub reap_children() { my $kid = 1; while ($kid > 0) { $kid = waitpid(-1, 1); } } #### perl -V Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Platform: osname=solaris, osvers=2.6, archname=sun4-solaris uname='sunos lonxpr1732 5.6 generic_105181-10 sun4m sparc sunw,sparcstation-5 ' hint=recommended, useposix=true, d_sigaction=define usethreads=undef useperlio=undef d_sfio=undef