Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
Loading...
Searching...
No Matches
replaceprocess.cpp File Reference

Handing the terminal over to another program (design 0030). More...

#include "replaceprocess.h"
#include "common.h"
#include <QtCore/QProcess>
#include <QtCore/qlogging.h>
#include <cstdio>
#include <QtCore/QList>
#include <cerrno>
#include <unistd.h>
#include <vector>

Namespaces

namespace  Sonde
 Embeddable Model Context Protocol server for Qt applications.

Functions

void Sonde::Cli::replaceProcess (const QString &program, const QStringList &args)
 Runs program (a path, or a name looked up on PATH) with args in sonde's place, with its standard input, output and error.

Detailed Description

Handing the terminal over to another program (design 0030).

Function Documentation

◆ replaceProcess()

void Sonde::Cli::replaceProcess ( const QString & program,
const QStringList & args )

Runs program (a path, or a name looked up on PATH) with args in sonde's place, with its standard input, output and error.

On POSIX sonde becomes it (execvp); on Windows, which can't do that, sonde runs it and exits with its exit status. Fails (status 1) if it can't be run.