|
Hello,
I'm trying to use IPC::Run's "run" for writing a script which should
run a "zpool status" command and alert if it does not complete within
a timeout.
I get an error:
'REF' not allowed as a sink for output redirection at ./check_zfs.pl line 160
Here's the relevant section of the script:
149 # pre-allocate 10k into $zpool_cmd_stdout and _stderr
150 my $zpool_cmd_stdout = '\n' x 10_000;
151 my $zpool_cmd_stderr = '\n' x 10_000;
152
153 my $timer;
154
155 $timer = timeout($timeout);
156 eval {
157 $zpool_cmd_stdout = '';
158 $zpool_cmd_stderr = '';
159 # COMMAND STDIN STDOUT STDERR
160 run \@zpool_list, \undef, \$zpool_cmd_stdout, \$zpool_cmd_stderr, \$timer;
161 };
To me, the way I use "run" matches the examples in the docs. What am
I doing wrong?
Using Solaris' PERL 5.8.4 and IPC::Run 0.80.
Thank you very much for any hint!
Regards,
Riccardo
|