1 // Copyright 2015 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef CHROMIUMOS_WIDE_PROFILING_RUN_COMMAND_H_
6 #define CHROMIUMOS_WIDE_PROFILING_RUN_COMMAND_H_
7 
8 #include <string>
9 #include <vector>
10 
11 #include "compat/string.h"
12 
13 namespace quipper {
14 
15 // Executes |command|. stderr is directed to /dev/null. If |output| is not null,
16 // stdout is stored in |output|, and to /dev/null otherwise. Returns the exit
17 // status of the command if it exited normally, or -1 otherwise. If the call
18 // to exec failed, then errno is set accordingly.
19 int RunCommand(const std::vector<string>& command, std::vector<char>* output);
20 
21 }  // namespace quipper
22 
23 #endif  // CHROMIUMOS_WIDE_PROFILING_RUN_COMMAND_H_
24