MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / initStdio

Method initStdio

source/kernel/kprocess.cpp:531–542  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

529}
530
531void KProcess::initStdio() {
532 KFileDescriptorPtr fd;
533 if (!this->getFileDescriptor(0)) {
534 this->openFileDescriptor(B(""), B("/dev/tty0"), K_O_RDONLY, 0, 0, 0, fd);
535 }
536 if (!this->getFileDescriptor(1)) {
537 this->openFileDescriptor(B(""), B("/dev/tty0"), K_O_WRONLY, 0, 1, 0, fd);
538 }
539 if (!this->getFileDescriptor(2)) {
540 this->openFileDescriptor(B(""), B("/dev/tty0"), K_O_WRONLY, 0, 2, 0, fd);
541 }
542}
543
544KThread* KProcess::startProcess(BString currentDirectory, const std::vector<BString>& argValues, const std::vector<BString>& envValues, int userId, int groupId, int effectiveUserId, int effectiveGroupId) {
545 std::shared_ptr<FsNode> node = Fs::getNodeFromLocalPath(currentDirectory, argValues[0], true);

Callers 2

onExecMethod · 0.95
startProcessMethod · 0.95

Calls 3

getFileDescriptorMethod · 0.95
openFileDescriptorMethod · 0.95
BFunction · 0.85

Tested by

no test coverage detected