FBB::Exec(3bobcat)
β¨ FBB::Exec β it's giving "run other programs" energy β¨
okay bestie, so this page lives in the 3bobcat manual (yes, FBB::Exec(3bobcat), that's the whole vibe) and it's literally about Executing Child Processes. Let's get into it π«Ά
π NAME π
FBB::Exec β runs external programs. no cap, that's the whole job.
πΈ SYNOPSIS πΈ
#include <bobcat/exec>
Linking option: -lbobcat
π¦ DESCRIPTION π¦
The FBB::Exec class hands you a basic interface for calling external programs (a.k.a. "child processes", a.k.a. lil baby programs you spawn πΌ). But listen β the standard streams of those child processes are not handled by Exec objects. The child process just uses the parent's standard streams. Sharing is caring, I guess.
Also, the PATH environment variable is not used when calling child processes. So you can't just be like "run cp" and expect the system to find it. Child process programs must be specified using paths. periodt.
Exec objects may be used repeatedly to execute the same or different child processes. But here's the rule: before starting the next child process, the current child process must have finished. one at a time, we don't do chaos here π
Arguments passed to child processes may be surrounded by double or single quotes, and they each behave differently, so pay attention:
- 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.,
\100is converted to@).
π NAMESPACE π
FBB
All constructors, members, operators and manipulators mentioned in this man-page are defined in the namespace FBB.
π§ INHERITS FROM π§
FBB::Fork
π CONSTRUCTOR π
Only the default constructor is supported. that's it. that's the constructor menu π
π MEMBERS π
bool execute(std::string const &cmd)β the argument specifies the command to execute: the command itself must be specified as a path (thePATHenvironment variable isn't used, remember?). This member returnstrueif the child process's exit value equals0. Otherwisefalseis returned. Onceexecutehas returned it can be called again, either using the same or another command. Here's the important part though: the classExecdoes not offer facilities to forcefully terminate child processes β parent processes are suspended until the child processes have completed. Like, you're just waiting, bestie. πΈ Arguments passed to the program to be executed as child process may optionally be specified using single or double quotes, as described in this man-page's DESCRIPTION section.int ret() constβ onceexecutehas returned, this member provides the actual exit code of the child process. Its value equals-1before the firstexecutecall. (yes, the original spells it "exectue", we don't talk about it π)
π₯ EXAMPLE π₯
#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";
}
π FILES π
bobcat/exec β provides the class interface
β SEE ALSO β
bobcat(7), cerrextractor(3bobcat), cininserter(3bobcat), coutextractor(3bobcat), execl(3), fork(3bobcat), process(3bobcat), stdextractor(3bobcat).
π BUGS π
None reported. we love a clean record β¨
π BOBCAT PROJECT FILES π
https://fbb-git.gitlab.io/bobcat/: gitlab project page;
Debian Bobcat project files:
libbobcat6: debian package containing the shared library, changelog and copyright note;libbobcat-dev: debian package containing the static library, headers, manual pages, and developer info;
π BOBCAT π
Bobcat is an acronym of `Brokkenβs Own Base Classes And Templatesβ. yes the backtick is doing its own thing there, iykyk π
π COPYRIGHT π
This is free software, distributed under the terms of the GNU General Public License (GPL).
π AUTHOR π
Frank B. Brokken (f.b.brokken@rug.nl).
and that's the whole page bestie π this was libbobcat-dev_6.15.01, dated 2005-2026 β mwah, iconic, no notes πβ¨
π¦ where this page comes from
- ubuntu stonking: libbobcat-dev 6.15.01-1 Β· GPL-3.0-or-later WITH OpenSSL exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms