in reply to safety in system calls
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.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.
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 |