~lattis/muon

ref: f9a8cbad39b665a9496cd3adb4756e85ee5ec97c muon/include/platform/run_cmd.h -rw-r--r-- 383 bytes
f9a8cbadStone Tickle print stdout/stderr of failing test 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef MUON_PLATFORM_RUN_CMD_H
#define MUON_PLATFORM_RUN_CMD_H

#include <stdbool.h>
#include <stdint.h>
#include <unistd.h>

struct run_cmd_ctx {
	char *err, *out;
	int status;

	/* error handling */
	const char *err_msg;
};

bool run_cmd(struct run_cmd_ctx *ctx, const char *_cmd, char *const argv[], char *const envp[]);
void run_cmd_ctx_destroy(struct run_cmd_ctx *ctx);
#endif