diff options
| author | Paul Eggert | 2013-07-16 00:05:41 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-07-16 00:05:41 -0700 |
| commit | c7ddc792b747fdf4fde822df0cf9c7b712be4219 (patch) | |
| tree | de532bf42e3675fa093996b13ddb490cb8ec2f6c /src/alloc.c | |
| parent | e6c005c5f8e39252fd11821b6452843bead2df6a (diff) | |
| download | emacs-c7ddc792b747fdf4fde822df0cf9c7b712be4219.tar.gz emacs-c7ddc792b747fdf4fde822df0cf9c7b712be4219.zip | |
Fix porting bug to older POSIXish platforms.
* sysdep.c (emacs_pipe): New function, that implements
pipe2 (fd, O_CLOEXEC) even on hosts that lack O_CLOEXEC.
This should port better to CentOS 5 and to Mac OS X 10.6.
All calls to pipe2 changed.
Fixes: debbugs:14862
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/alloc.c b/src/alloc.c index b71cdb98d78..b52e3de0494 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -4741,7 +4741,7 @@ valid_pointer_p (void *p) | |||
| 4741 | Unfortunately, we cannot use NULL_DEVICE here, as emacs_write may | 4741 | Unfortunately, we cannot use NULL_DEVICE here, as emacs_write may |
| 4742 | not validate p in that case. */ | 4742 | not validate p in that case. */ |
| 4743 | 4743 | ||
| 4744 | if (pipe2 (fd, O_CLOEXEC) == 0) | 4744 | if (emacs_pipe (fd) == 0) |
| 4745 | { | 4745 | { |
| 4746 | bool valid = emacs_write (fd[1], (char *) p, 16) == 16; | 4746 | bool valid = emacs_write (fd[1], (char *) p, 16) == 16; |
| 4747 | emacs_close (fd[1]); | 4747 | emacs_close (fd[1]); |