in reply to safety in system calls

Your 'my $handle' line should be something like this:
my $handle = new IO::File(">$file") or die "Can't open $file: $!"; # Or in 5.005 or later to avoid having to use IO::File # (doesn't seem to work in 5.004) my $handle = \do { local *FH }; open ($handle, ">$file") or die ..etc.
Update:Do you really want the WNOHANG on the waitpid loop? You'll just be chewing up CPU until all the children exit. Better (I think) to leave out the WNOHANG and let the process block.

Update2:hmm, just plain 'my $handle' seems to work ok in 5.6 - I wonder when that happened? Does that mean that this particular use for Dominus' Globjects (and for that matter, alot of the reason for FileHandle and IO::File) is now pointless?

Replies are listed 'Best First'.
Re: Re: safety in system calls
by marvell (Pilgrim) on Jul 02, 2001 at 16:56 UTC

    Once again, the code was not really thought about too for the test section.

    This whole area of perl is one which I've never really found a great explanation for. If anyone can recommend a node explaining how it works, fully, then that would be splendid.

    --
    Brother Marvell

    ¤