#!/usr/bin/perl use strict; use warnings; my $pid = fork; if ((defined $pid) && ($pid == 0)) { open(STDOUT, "/dev/null"); # suppressing output open(STDERR, "/dev/null"); # suppressing output exec("sleep", "30"); exit; } print "child pid [$pid]\n";