Skip to content

Commit 63cdbff

Browse files
committed
update comment and include of select
1 parent 870894e commit 63cdbff

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

src/afl-forkserver.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
#include <sys/time.h>
5151
#include <sys/wait.h>
5252
#include <sys/resource.h>
53-
#include <sys/select.h>
5453
#include <sys/stat.h>
5554
#include <grp.h>
5655

@@ -401,7 +400,7 @@ void afl_fsrv_setup_preload(afl_forkserver_t *fsrv, char *argv0) {
401400

402401
}
403402

404-
/* Wrapper for select() and read(), reading a 32 bit var.
403+
/* Wrapper for poll() and read(), reading a 32 bit var.
405404
Returns the time passed to read.
406405
If the wait times out, returns timeout_ms + 1;
407406
Returns 0 if an error occurred (fd closed, signal, ...); */
@@ -420,7 +419,7 @@ static u32 __attribute__((hot)) read_s32_timed(s32 fd, s32 *buf, u32 timeout_ms,
420419
fds[0].events = POLLIN;
421420

422421
/* set exceptfds as well to return when a child exited/closed the pipe. */
423-
restart_select:
422+
restart_poll:
424423
pret = poll(fds, nfds, timeout_ms);
425424
if (likely(pret > 0)) {
426425

@@ -458,7 +457,7 @@ static u32 __attribute__((hot)) read_s32_timed(s32 fd, s32 *buf, u32 timeout_ms,
458457

459458
} else if (unlikely(pret < 0)) {
460459

461-
if (likely(errno == EINTR)) goto restart_select;
460+
if (likely(errno == EINTR)) goto restart_poll;
462461

463462
*buf = -1;
464463
return 0;

src/afl-fuzz-cmplog.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
2525
*/
2626

27-
#include <sys/select.h>
28-
2927
#include "afl-fuzz.h"
3028
#include "cmplog.h"
3129

src/afl-fuzz-sanfuzz.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626

2727
/* This file roughly follows afl-fuzz-asanfuzz */
2828

29-
#include <sys/select.h>
30-
3129
#include "afl-fuzz.h"
3230

3331
void sanfuzz_exec_child(afl_forkserver_t *fsrv, char **argv) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy