FBB::Exec(3bobcat) | Executing Child Processes | FBB::Exec(3bobcat) |
FBB::Exec - Runs external programs
#include <bobcat/exec>
Linking option: -lbobcat
The FBB::Exec class offers a basic interface for calling external programs (so-called child processes). The standard streams of the child processes are not handled by Exec objects: the parent’s standard streams are used by the child process. The PATH environment variable is not used when calling child processes: child process programs must be specified using paths.
Exec objects may repeatedly be used to execute the same or different child processes. Before starting the next child process, the current child process must have finished.
Arguments passed to child processes may be surrounded by double or single quotes. Arguments surrounded by double quotes have their double quotes removed, while interpreting any escape-sequences that may have been used within. Arguments surrounded by single quotes have their single quotes removed, while accepting their content as-is. In addition unquoted escape-sequences may be specified: those escape sequences are evaluated and replaced by their intended characters (e.g., \100 is converted to @).
FBB
All constructors, members, operators and manipulators, mentioned in this
man-page, are defined in the namespace FBB.
FBB::Fork
Only the default constructor is supported.
#include <iostream> #include <bobcat/execfork> using namespace std; using namespace FBB; int main() {
ExecFork ef;
if (ef.execute("/bin/cp driver.cc /tmp"))
cout << "driver.cc now copied to /tmp\n";
else
cout << "could not copy driver.cc to /tmp\n";
cout << "Again:\n";
if (ef.execute("/bin/cp driver.cc /tmp"))
cout << "driver.cc now copied to /tmp\n";
else
cout << "could not copy driver.cc to /tmp\n"; }
bobcat/exec - provides the class interface
bobcat(7), cerrextractor(3bobcat), cininserter(3bobcat), coutextractor(3bobcat), execl(3), fork(3bobcat), process(3bobcat), stdextractor(3bobcat).
None reported.
Bobcat is an acronym of `Brokken’s Own Base Classes And Templates’.
This is free software, distributed under the terms of the GNU General Public License (GPL).
Frank B. Brokken (f.b.brokken@rug.nl).
2005-2022 | libbobcat-dev_6.02.02 |