#!/usr/bin/perl use strict; use warnings; use POSIX ":sys_wait_h"; my $tmpfile="iso.out"; my $device='/dev/cdrw0'; my $isofile='test.iso'; my $cmd=qq!growisofs -Z $device=$isofile >$tmpfile 2>&1!; my $pid=fork(); die("ERROR FORK!")unless(definded($pid)); if($pid) { while(1) { last if(waitpid($pid_c, WNOHANG)); print "WARTE!\n"; sleep(1); } print "EXIT\n"; } else { exec($cmd); die("EXEC ERROR!"); }