george.karpenkov | 29efa6d | 2017-08-21 23:25:50 +0000 | [diff] [blame] | 1 | //===- 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 | edcfbba | 2017-08-30 22:44:11 +0000 | [diff] [blame] | 12 | #if LIBFUZZER_LINUX || LIBFUZZER_NETBSD |
morehouse | a80f645 | 2017-12-04 19:25:59 +0000 | [diff] [blame] | 13 | #include "FuzzerCommand.h" |
george.karpenkov | 29efa6d | 2017-08-21 23:25:50 +0000 | [diff] [blame] | 14 | |
| 15 | #include <stdlib.h> |
| 16 | |
| 17 | namespace fuzzer { |
| 18 | |
morehouse | a80f645 | 2017-12-04 19:25:59 +0000 | [diff] [blame] | 19 | int ExecuteCommand(const Command &Cmd) { |
| 20 | std::string CmdLine = Cmd.toString(); |
| 21 | return system(CmdLine.c_str()); |
george.karpenkov | 29efa6d | 2017-08-21 23:25:50 +0000 | [diff] [blame] | 22 | } |
| 23 | |
| 24 | } // namespace fuzzer |
| 25 | |
kamil | edcfbba | 2017-08-30 22:44:11 +0000 | [diff] [blame] | 26 | #endif // LIBFUZZER_LINUX || LIBFUZZER_NETBSD |