xapian-core  1.4.19
Functions
runprocess.cc File Reference

run an external process and capture its output in a string. More...

#include <config.h>
#include "runprocess.h"
#include "stringutils.h"
#include <stdio.h>
#include <string>
#include "safesyswait.h"
+ Include dependency graph for runprocess.cc:

Go to the source code of this file.

Functions

string stdout_to_string (const string &cmd)
 Run command cmd, capture its stdout, and return it as a std::string. More...
 

Detailed Description

run an external process and capture its output in a string.

Definition in file runprocess.cc.

Function Documentation

◆ stdout_to_string()

string stdout_to_string ( const string &  cmd)

Run command cmd, capture its stdout, and return it as a std::string.

Definition at line 39 of file runprocess.cc.

References C_isspace().

Referenced by get_commit_ref(), get_distro(), get_loadavg(), and get_ncpus().