xref: /dflybsd-src/contrib/grep/lib/unistd-safer.h (revision 91b9ed38d3db6a8a8ac5b66da1d43e6e331e259a)
1cf28ed85SJohn Marino /* Invoke unistd-like functions, but avoid some glitches.
2cf28ed85SJohn Marino 
3*09d4459fSDaniel Fojt    Copyright (C) 2001, 2003, 2005, 2009-2020 Free Software Foundation, Inc.
4cf28ed85SJohn Marino 
5cf28ed85SJohn Marino    This program is free software: you can redistribute it and/or modify
6cf28ed85SJohn Marino    it under the terms of the GNU General Public License as published by
7cf28ed85SJohn Marino    the Free Software Foundation; either version 3 of the License, or
8cf28ed85SJohn Marino    (at your option) any later version.
9cf28ed85SJohn Marino 
10cf28ed85SJohn Marino    This program is distributed in the hope that it will be useful,
11cf28ed85SJohn Marino    but WITHOUT ANY WARRANTY; without even the implied warranty of
12cf28ed85SJohn Marino    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13cf28ed85SJohn Marino    GNU General Public License for more details.
14cf28ed85SJohn Marino 
15cf28ed85SJohn Marino    You should have received a copy of the GNU General Public License
16*09d4459fSDaniel Fojt    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
17cf28ed85SJohn Marino 
18cf28ed85SJohn Marino /* Written by Paul Eggert and Eric Blake.  */
19cf28ed85SJohn Marino 
20cf28ed85SJohn Marino int dup_safer (int);
21cf28ed85SJohn Marino int fd_safer (int);
22cf28ed85SJohn Marino int pipe_safer (int[2]);
23cf28ed85SJohn Marino 
24cf28ed85SJohn Marino #if GNULIB_FD_SAFER_FLAG
25cf28ed85SJohn Marino int dup_safer_flag (int, int);
26cf28ed85SJohn Marino int fd_safer_flag (int, int);
27cf28ed85SJohn Marino #endif
28cf28ed85SJohn Marino 
29cf28ed85SJohn Marino #if GNULIB_PIPE2_SAFER
30cf28ed85SJohn Marino int pipe2_safer (int[2], int);
31cf28ed85SJohn Marino #endif
32