Lolly 1.4.27
Loading...
Searching...
No Matches
subprocess.hpp
Go to the documentation of this file.
1
2/******************************************************************************
3 * MODULE : subprocess.hpp
4 * DESCRIPTION: subprocess related routines
5 * COPYRIGHT : (C) 2023 Darcy Shen
6 *******************************************************************************
7 * This software falls under the GNU general public license version 3 or later.
8 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
9 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
10 ******************************************************************************/
11
12#pragma once
13
14#include "string.hpp"
15#include <stdint.h>
16
17namespace lolly {
18namespace system {
19int call (string cmd);
20int check_output (string cmd, string& result, bool stderr_only,
22inline int
23check_stdout (string cmd, string& result) {
24 return check_output (cmd, result, false, 20);
25}
26inline int
27check_stderr (string cmd, string& result) {
28 return check_output (cmd, result, true, 20);
29}
30} // namespace system
31} // namespace lolly
The list class represents a linked list.
Definition list.hpp:48
int call(string cmd)
int check_stderr(string cmd, string &result)
int check_stdout(string cmd, string &result)
int check_output(string s, string &result, bool stderr_only, int64_t timeout)