diff options
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2010-04-08 01:11:46 (GMT) |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2010-04-13 01:26:35 (GMT) |
commit | 74da141e618ef99959d509cb2e7be35a348a39db (patch) | |
tree | 88ebc38b381a1021fc2d74864a71e230ae591c3d /gl/dup-safer.c | |
parent | c63a4f726a0b6ad8cf6040f947754a81fd4683bb (diff) | |
download | monitoring-plugins-74da141e618ef99959d509cb2e7be35a348a39db.tar.gz |
Sync with the latest Gnulib code (177f525)
Signed-off-by: Thomas Guyot-Sionnest <dermoth@aei.ca>
Diffstat (limited to 'gl/dup-safer.c')
-rw-r--r-- | gl/dup-safer.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/gl/dup-safer.c b/gl/dup-safer.c index 7d9b2be..33f599b 100644 --- a/gl/dup-safer.c +++ b/gl/dup-safer.c | |||
@@ -1,7 +1,6 @@ | |||
1 | /* Invoke dup, but avoid some glitches. | 1 | /* Invoke dup, but avoid some glitches. |
2 | 2 | ||
3 | Copyright (C) 2001, 2004, 2005, 2006, 2009 Free Software | 3 | Copyright (C) 2001, 2004-2006, 2009-2010 Free Software Foundation, Inc. |
4 | Foundation, Inc. | ||
5 | 4 | ||
6 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
@@ -23,7 +22,6 @@ | |||
23 | #include "unistd-safer.h" | 22 | #include "unistd-safer.h" |
24 | 23 | ||
25 | #include <fcntl.h> | 24 | #include <fcntl.h> |
26 | |||
27 | #include <unistd.h> | 25 | #include <unistd.h> |
28 | 26 | ||
29 | /* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or | 27 | /* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or |
@@ -32,11 +30,5 @@ | |||
32 | int | 30 | int |
33 | dup_safer (int fd) | 31 | dup_safer (int fd) |
34 | { | 32 | { |
35 | #if defined F_DUPFD && !defined FCHDIR_REPLACEMENT | ||
36 | return fcntl (fd, F_DUPFD, STDERR_FILENO + 1); | 33 | return fcntl (fd, F_DUPFD, STDERR_FILENO + 1); |
37 | #else | ||
38 | /* fd_safer calls us back, but eventually the recursion unwinds and | ||
39 | does the right thing. */ | ||
40 | return fd_safer (dup (fd)); | ||
41 | #endif | ||
42 | } | 34 | } |