I don't think that "No child process" is locale sensitive, but on some platforms could produce "No children" instead (citation). However, you can ignore the error message's text by remembering that $! is a dual-valued variable; In string context it returns the error message. In numeric context, it returns the error number, which can be tested against the &Errno::ECHILD constant (Errno).
Or you can use %! in some variant on the example code shown in Errno's POD:
# A variation on Errno's POD example: use Errno qw( ECHILD ); # ........ if ( not close $something ) { if( not $!{ECHILD} ) { die "Houston, we have a problem: $!"; } else { # Silence is golden; ECHILD is silent. } }
Dave
In reply to Re: Check for "No child processes" internationally
by davido
in thread Check for "No child processes" internationally
by saintmike
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |