mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
O_CLOEXEC usage
* libguile/objcodes.c (scm_load_objcode): * libguile/scmsigs.c (start_signal_delivery_thread): * libguile/threads.c (guilify_self_1): Use O_CLOEXEC.
This commit is contained in:
parent
3d458a81c6
commit
32f94bf258
3 changed files with 4 additions and 17 deletions
|
@ -39,6 +39,7 @@
|
|||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <nproc.h>
|
||||
|
||||
#include "libguile/validate.h"
|
||||
|
@ -57,15 +58,6 @@
|
|||
#include "libguile/strings.h"
|
||||
#include "libguile/weaks.h"
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#ifndef ETIMEDOUT
|
||||
# define ETIMEDOUT WSAETIMEDOUT
|
||||
#endif
|
||||
# include <fcntl.h>
|
||||
# include <process.h>
|
||||
# define pipe(fd) _pipe (fd, 256, O_BINARY)
|
||||
#endif /* __MINGW32__ */
|
||||
|
||||
#include <full-read.h>
|
||||
|
||||
|
||||
|
@ -538,7 +530,7 @@ guilify_self_1 (struct GC_stack_base *base)
|
|||
t.sleep_object = SCM_BOOL_F;
|
||||
t.sleep_fd = -1;
|
||||
|
||||
if (pipe (t.sleep_pipe) != 0)
|
||||
if (pipe2 (t.sleep_pipe, O_CLOEXEC) != 0)
|
||||
/* FIXME: Error conditions during the initialization phase are handled
|
||||
gracelessly since public functions such as `scm_init_guile ()'
|
||||
currently have type `void'. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue