STASIS
A pipeline delivery generator
Loading...
Searching...
No Matches
src
lib
core
include
system.h
Go to the documentation of this file.
1
5
#ifndef STASIS_SYSTEM_H
6
#define STASIS_SYSTEM_H
7
8
#include <stdio.h>
9
#include <stdlib.h>
10
#include <string.h>
11
#include <errno.h>
12
#include <unistd.h>
13
#include <limits.h>
14
#include <sys/wait.h>
15
#include <sys/stat.h>
16
17
#define STASIS_SHELL_SAFE_RESTRICT ";&|()"
18
19
struct
Process
{
20
// Write stdout stream to file
21
char
f_stdout[PATH_MAX];
22
// Write stderr stream to file
23
char
f_stderr[PATH_MAX];
24
// Combine stderr and stdout (into stdout stream)
25
int
redirect_stderr;
26
// Exit code from program
27
int
returncode;
28
};
29
30
int
shell(
struct
Process
*proc,
char
*args);
31
int
shell_safe(
struct
Process
*proc,
char
*args);
32
char
*shell_output(
const
char
*command,
int
*status);
33
34
#endif
//STASIS_SYSTEM_H
Process
Definition
system.h:19
Generated by
1.13.2