in reply to Problem writing to file from a daemon
use strict; my $file; open($file, ">abc"); my $ret = fork; if ($ret) { print $file "log from parent\n"; sleep(5); close($file); } else { print $file "log from child\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
When to close
by peschkaj (Pilgrim) on Nov 11, 2002 at 19:26 UTC |