18void WvSystem::init(
const char *
const *argv)
21 WvSubProc::preparev(argv[0], argv);
30 int nfd = ::open(file, mode, 0666);
42int WvSystem::fork(
int *waitfd)
44 int pid = WvSubProc::fork(waitfd);
47 if (!fdfiles[0].isnull())
48 fd_open(0, fdfiles[0], O_RDONLY);
49 if (!fdfiles[1].isnull())
50 fd_open(1, fdfiles[1], O_WRONLY|O_CREAT);
51 if (!fdfiles[2].isnull())
52 fd_open(2, fdfiles[2], O_WRONLY|O_CREAT);
63 WvSubProc::start_again();
66 WvSubProc::wait(-1,
false);
67 return WvSubProc::estatus;
73 fdfiles[0] = filename;
80 fdfiles[1] = filename;
87 fdfiles[2] = filename;
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
WvSystem is a mostly-replacement for the libc system() function call, which people usually use becaus...
WvSystem & infile(WvStringParm filename)
Redirect stdin from the given input file.
int go()
Explicitly start the command running and wait for it to finish.
virtual ~WvSystem()
Destroy the WvSystem object.
WvSystem & outfile(WvStringParm filename)
Redirect stdout to the given output file, which is overwritten.
WvSystem & errfile(WvStringParm filename)
Redirect stderr to the given output file, which is overwritten.