Rechercher une page de manuel
Sys::VirtV2V::ExecHelper.3pm
Langue: en
Version: 2010-07-01 (fedora - 01/12/10)
Section: 3 (Bibliothèques de fonctions)
NAME
Sys::VirtV2V::ExecHelper - Execute a command with output suppressionSYNOPSIS
use Sys::VirtV2V::ExecHelper; $eh = Sys::VirtV2V::ExecHelper->run('rpm', '-V', 'bash'); if($eh->status() != 0) { print STDERR $eh->output(); }
DESCRIPTION
Sys::VirtV2V::ExecHelper is a substitute for system() when you don't want any command output. Sys::VirtV2V::ExecHelper does, however, make STDOUT and STDERR available in a combined stream if it is required, for example because the executed command failed.METHODS
- run(@command)
- Run @command, which is an array containing the command and its arguments.
The command will be executed immediately. ExecHelper will block until the command exits.
- status
- Return the exit status of the executed command.
- output
- Return the combined stdout and stderr of the command.
WARNING: This command puts the output in a string in memory. Don't use this if the output could be large.
COPYRIGHT
Copyright (C) 2009 Red Hat Inc.LICENSE
Please see the file COPYING.LIB for the full license.SEE ALSO
virt-v2v(1), <http://libguestfs.org/>.Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre