blob: 640f3d9c5d1fbb08fb7dc6c02679123eaacc0f67 [file] [log] [blame]
george.karpenkov29efa6d2017-08-21 23:25:50 +00001//===- FuzzerUtilLinux.cpp - Misc utils for Linux. ------------------------===//
2//
chandlerc40284492019-01-19 08:50:56 +00003// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
george.karpenkov29efa6d2017-08-21 23:25:50 +00006//
7//===----------------------------------------------------------------------===//
8// Misc utils for Linux.
9//===----------------------------------------------------------------------===//
10#include "FuzzerDefs.h"
vitalybuka5f3206d2018-04-09 22:38:26 +000011#if LIBFUZZER_LINUX || LIBFUZZER_NETBSD || LIBFUZZER_FREEBSD || \
12 LIBFUZZER_OPENBSD
morehousea80f6452017-12-04 19:25:59 +000013#include "FuzzerCommand.h"
george.karpenkov29efa6d2017-08-21 23:25:50 +000014
15#include <stdlib.h>
16
17namespace fuzzer {
18
morehousea80f6452017-12-04 19:25:59 +000019int ExecuteCommand(const Command &Cmd) {
20 std::string CmdLine = Cmd.toString();
21 return system(CmdLine.c_str());
george.karpenkov29efa6d2017-08-21 23:25:50 +000022}
23
24} // namespace fuzzer
25
vitalybuka5f3206d2018-04-09 22:38:26 +000026#endif