| 104 | } |
| 105 | |
| 106 | void SetTimer(int Seconds) { |
| 107 | struct itimerval T { |
| 108 | {Seconds, 0}, { Seconds, 0 } |
| 109 | }; |
| 110 | if (setitimer(ITIMER_REAL, &T, nullptr)) { |
| 111 | Printf("libFuzzer: setitimer failed with %d\n", errno); |
| 112 | exit(1); |
| 113 | } |
| 114 | SetSigaction(SIGALRM, AlarmHandler); |
| 115 | } |
| 116 | |
| 117 | void SetSignalHandler(const FuzzingOptions& Options) { |
| 118 | // setitimer is not implemented in emscripten. |
no test coverage detected