aboutsummaryrefslogtreecommitdiff
path: root/include/shell.h
blob: 44637e7c897c7f0b50d2a4479a483e5827c21754 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/**
 * @file shell.h
 */
#ifndef SPM_SHELL_H
#define SPM_SHELL_H

#define SHELL_INVALID "&;|"
#define SHELL_DEFAULT 1 << 0
#define SHELL_OUTPUT 1 << 1
#define SHELL_BENCHMARK 1 << 2

typedef struct {
    struct timespec start_time, stop_time;
    double time_elapsed;
    int returncode;
    char *output;
} Process;

void shell(Process **proc_info, u_int64_t option, const char *fmt, ...);
void shell_free(Process *proc_info);

#endif //SPM_SHELL_H