blob: f8b5d11c534bce922ce34806a4f91f9d1cd15ee6 [file] [log] [blame]
George Karpenkov10ab2ac2017-08-21 23:25:50 +00001//===- FuzzerUtilLinux.cpp - Misc utils for Linux. ------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9// Misc utils for Linux.
10//===----------------------------------------------------------------------===//
11#include "FuzzerDefs.h"
Kamil Rytarowskie81e9442018-01-12 17:15:05 +000012#if LIBFUZZER_LINUX || LIBFUZZER_NETBSD || LIBFUZZER_FREEBSD
Matt Morehouse04304d12017-12-04 19:25:59 +000013#include "FuzzerCommand.h"
George Karpenkov10ab2ac2017-08-21 23:25:50 +000014
15#include <stdlib.h>
16
17namespace fuzzer {
18
Matt Morehouse04304d12017-12-04 19:25:59 +000019int ExecuteCommand(const Command &Cmd) {
20 std::string CmdLine = Cmd.toString();
21 return system(CmdLine.c_str());
George Karpenkov10ab2ac2017-08-21 23:25:50 +000022}
23
24} // namespace fuzzer
25
Kamil Rytarowskie81e9442018-01-12 17:15:05 +000026#endif // LIBFUZZER_LINUX || LIBFUZZER_NETBSD || LIBFUZZER_FREEBSD