GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Connector::Proxy::Proc::SafeExec(3) User Contributed Perl Documentation Connector::Proxy::Proc::SafeExec(3)

Connector::Builtin::System::Exec

Run a command using Proc::SafeExec.

Allows passing of arguments, stdin and env, each item of those lists is parsed as a template with the path arguments set in ARGS. In set mode the filename generated from content is set to FILE.

    my $con = Connector::Proxy::DBI->new({
        LOCATION => '/usr/bin/script',
        args     => ['--foo','ARGS.0'],
        content  => '[% payload %]',
        env => {
            BAR => 'bar'
        },
        chomp_output  => 1,
        timeout  => 2,
    });

List of parameters that are passed as arguments to the command.
Timeout to wait for the command in seconds, default is 5
A string or an array of strings to pipe as stdin to the command. Items are joined with a newline.
Expects a HashRef where the key is the name of the ENV variable.
A template string used to generate a tempfile when set mode is used.

The following call will create a tempfile with the content 'Hello World' and afterwards runs the systems copy command using the first path argument from the connector call as target filename.

    my $con = Connector::Proxy::DBI->new({
        LOCATION => '/usr/bin/cp',
        args     => ['[% FILE %]', '[% ARGS.0 %]''],
        content  => '[% payload %]',
    });
    $conn->set('foo.txt', { payload => 'Hello World' } );
    
2025-05-08 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.