diff --git a/src/util/sys_compat.c b/src/util/sys_compat.c index 8bf8e58..c87f043 100644 --- a/src/util/sys_compat.c +++ b/src/util/sys_compat.c @@ -286,7 +286,7 @@ int dup2_pass_on_exec(int oldd, int newd) /* closefrom() - closes all file descriptors from the given one up */ -int closefrom(int lowfd) +void closefrom(int lowfd) { int fd_limit = open_limit(0); int fd; @@ -298,14 +298,14 @@ int closefrom(int lowfd) */ if (lowfd < 0) { errno = EBADF; - return (-1); + return; } if (fd_limit > 500) fd_limit = 500; for (fd = lowfd; fd < fd_limit; fd++) (void) close(fd); - return (0); + return; } #endif diff --git a/src/util/sys_defs.h b/src/util/sys_defs.h index 99bec9b..16e27db 100644 --- a/src/util/sys_defs.h +++ b/src/util/sys_defs.h @@ -1509,7 +1509,7 @@ extern int setsid(void); #endif #ifndef HAS_CLOSEFROM -extern int closefrom(int); +extern void closefrom(int); #endif