diff options
Diffstat (limited to 'libjava/include/posix.h')
-rw-r--r-- | libjava/include/posix.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libjava/include/posix.h b/libjava/include/posix.h index f965074..05c6ddf 100644 --- a/libjava/include/posix.h +++ b/libjava/include/posix.h @@ -28,13 +28,17 @@ details. */ #include <unistd.h> #endif +#include <fcntl.h> + #include <gcj/cni.h> extern int _Jv_select (int n, fd_set *, fd_set *, fd_set *, struct timeval *); extern jlong _Jv_platform_gettimeofday (); extern void _Jv_platform_initialize (void); - - - - +inline void +_Jv_platform_close_on_exec (jint fd) +{ + // Ignore errors. + fcntl (fd, F_SETFD, FD_CLOEXEC); +} |