Lolly
1.4.28
Loading...
Searching...
No Matches
lolly
system
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
17
namespace
lolly
{
18
namespace
system {
19
int
call
(
string
cmd
);
20
int
check_output
(
string
cmd
,
string
&
result
,
bool
stderr_only
,
21
int64_t
timeout
);
22
inline
int
23
check_stdout
(
string
cmd
,
string
&
result
) {
24
return
check_output
(
cmd
,
result
,
false
, 20);
25
}
26
inline
int
27
check_stderr
(
string
cmd
,
string
&
result
) {
28
return
check_output
(
cmd
,
result
,
true
, 20);
29
}
30
}
// namespace system
31
}
// namespace lolly
list
The list class represents a linked list.
Definition
list.hpp:48
lolly::system::call
int call(string cmd)
Definition
subprocess.cpp:31
lolly::system::check_stderr
int check_stderr(string cmd, string &result)
Definition
subprocess.hpp:27
lolly::system::check_stdout
int check_stdout(string cmd, string &result)
Definition
subprocess.hpp:23
lolly::system::check_output
int check_output(string s, string &result, bool stderr_only, int64_t timeout)
Definition
subprocess.cpp:57
lolly
Definition
lolly_tree_bench.cpp:13
string.hpp
Generated by
1.10.0