PQS: Post Quantum Shell Protocol 1.1.0.0a (A2)
A quantum secure secure shell protocol
pqsprocess.h File Reference

PQS server process-execution isolation helper. More...

#include "pqs.h"
#include "pqssandbox.h"
#include "pqsshell.h"

Go to the source code of this file.

Typedefs

typedef bool(* pqs_process_output_callback) (void *context, const char *message, size_t msglen)

Functions

PQS_EXPORT_API bool pqs_process_execute (const char *command, size_t cmdlen, const pqs_shell_profile *profile, const pqs_sandbox_profile *sandbox, pqs_process_output_callback callback, void *context, bool *timedout, bool *outputlimited)
 Execute a command through an approved shell profile and stream output through a callback.

Detailed Description

PQS server process-execution isolation helper.

Function Documentation

◆ pqs_process_execute()

PQS_EXPORT_API bool pqs_process_execute ( const char * command,
size_t cmdlen,
const pqs_shell_profile * profile,
const pqs_sandbox_profile * sandbox,
pqs_process_output_callback callback,
void * context,
bool * timedout,
bool * outputlimited )

Execute a command through an approved shell profile and stream output through a callback.

Parameters
command[const] The NUL-terminated command string.
cmdlenThe command length in bytes.
profile[const] The resolved shell profile.
sandbox[const] The server sandbox profile.
callbackThe output streaming callback.
contextAn opaque callback context.
timedout[bool] Optional output set to true when the sandbox timeout terminates the process.
outputlimited[bool] Optional output set to true when the sandbox output limit terminates the process.
Returns
Returns true if command output was produced or the command completed without a process-launch error.