Am 31.05.2013 07:43, schrieb Dietmar Maurer: >> eval { >> run_command($cmd, errmsg => "rbd error", errfunc => sub { }, outfunc >> => $parser); >> }; >> my $err = $@; >> >> ====> under which circumstances does run_command die? errorcode != 0? >> >> die $err if $err && $err !~ m/doesn't contain rbd images/ ; >> >> Where does this content $@ comes from? errfunc does nothing... > > The important thing here is: > > Parameter: errmsg => "rbd error" > > This records the last string from 'stderr', and use that string for the > exception if errorcode != 0. >
So the content or errmsg => is irrelevant? So if errmsg is set it means save the last line of stderr and die with it if exitcode != 0? Sorry jsut want to be sure how it works. Stefan _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel