blob: 8ad613f1fb2e180431a467dc2d6b3732e854d160 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
//
// Created by jhunk on 10/4/23.
//
#ifndef OMC_SYSTEM_H
#define OMC_SYSTEM_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <limits.h>
#include <sys/wait.h>
#include <sys/stat.h>
struct Process {
char stdout[PATH_MAX];
char stderr[PATH_MAX];
int redirect_stderr;
int returncode;
};
int shell(struct Process *proc, char *args);
int shell_safe(struct Process *proc, char *args);
char *shell_output(const char *command, int *status);
#endif //OMC_SYSTEM_H
|