Robert Swiecki | 0e67388 | 2016-03-31 18:50:29 +0200 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * honggfuzz - routines dealing with subprocesses |
| 4 | * ----------------------------------------- |
| 5 | * |
| 6 | * Author: Robert Swiecki <swiecki@google.com> |
| 7 | * |
| 8 | * Copyright 2010-2015 by Google Inc. All Rights Reserved. |
| 9 | * |
| 10 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 11 | * not use this file except in compliance with the License. You may obtain |
| 12 | * a copy of the License at |
| 13 | * |
| 14 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 15 | * |
| 16 | * Unless required by applicable law or agreed to in writing, software |
| 17 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 19 | * implied. See the License for the specific language governing |
| 20 | * permissions and limitations under the License. |
| 21 | * |
| 22 | */ |
| 23 | |
| 24 | #ifndef _HF_SUBPROC_H_ |
| 25 | #define _HF_SUBPROC_H_ |
| 26 | |
Robert Swiecki | 10eeb0a | 2017-09-28 15:42:52 +0200 | [diff] [blame] | 27 | #include "honggfuzz.h" |
Jagger | c8b6eda | 2016-09-01 03:52:35 +0200 | [diff] [blame] | 28 | |
| 29 | /* Missing WIFCONTINUED in Android */ |
| 30 | #ifndef WIFCONTINUED |
| 31 | #define WIFCONTINUED(x) WEXITSTATUS(0) |
| 32 | #endif |
| 33 | |
Robert Swiecki | 4e595fb | 2017-10-11 17:26:51 +0200 | [diff] [blame] | 34 | extern const char* subproc_StatusToStr(int status, char* str, size_t len); |
Robert Swiecki | eab0e86 | 2016-10-18 23:04:42 +0200 | [diff] [blame] | 35 | |
Robert Swiecki | 78633d1 | 2017-11-13 23:24:55 +0100 | [diff] [blame] | 36 | extern bool subproc_PrepareExecv(run_t* run, const char* fileName); |
Robert Swiecki | eab0e86 | 2016-10-18 23:04:42 +0200 | [diff] [blame] | 37 | |
Robert Swiecki | 78633d1 | 2017-11-13 23:24:55 +0100 | [diff] [blame] | 38 | extern bool subproc_Run(run_t* run); |
Robert Swiecki | eab0e86 | 2016-10-18 23:04:42 +0200 | [diff] [blame] | 39 | |
Robert Swiecki | 78633d1 | 2017-11-13 23:24:55 +0100 | [diff] [blame] | 40 | extern bool subproc_persistentModeRoundDone(run_t* run); |
Robert Swiecki | eab0e86 | 2016-10-18 23:04:42 +0200 | [diff] [blame] | 41 | |
Robert Swiecki | 78633d1 | 2017-11-13 23:24:55 +0100 | [diff] [blame] | 42 | extern uint8_t subproc_System(run_t* run, const char* const argv[]); |
Robert Swiecki | 0e67388 | 2016-03-31 18:50:29 +0200 | [diff] [blame] | 43 | |
Robert Swiecki | 78633d1 | 2017-11-13 23:24:55 +0100 | [diff] [blame] | 44 | extern void subproc_checkTimeLimit(run_t* run); |
Robert Swiecki | fddc086 | 2016-10-27 12:42:46 +0200 | [diff] [blame] | 45 | |
Robert Swiecki | 78633d1 | 2017-11-13 23:24:55 +0100 | [diff] [blame] | 46 | extern void subproc_checkTermination(run_t* run); |
Robert Swiecki | 4f09ce0 | 2017-02-25 22:47:55 +0100 | [diff] [blame] | 47 | |
Robert Swiecki | 0e67388 | 2016-03-31 18:50:29 +0200 | [diff] [blame] | 48 | #endif |