diff options
Diffstat (limited to 'plugins/popen.c')
-rw-r--r-- | plugins/popen.c | 87 |
1 files changed, 42 insertions, 45 deletions
diff --git a/plugins/popen.c b/plugins/popen.c index 45d2a3dc..df00ebeb 100644 --- a/plugins/popen.c +++ b/plugins/popen.c | |||
@@ -1,48 +1,45 @@ | |||
1 | /**************************************************************************** | 1 | /***************************************************************************** |
2 | * | 2 | * |
3 | * Nagios plugins popen | 3 | * Nagios plugins popen |
4 | * | 4 | * |
5 | * License: GPL | 5 | * License: GPL |
6 | * Copyright (c) 2005 nagios-plugins team | 6 | * Copyright (c) 2005-2007 Nagios Plugins Development Team |
7 | * | 7 | * |
8 | * Last Modified: $Date$ | 8 | * Last Modified: $Date$ |
9 | * | 9 | * |
10 | * Description: | 10 | * Description: |
11 | * | 11 | * |
12 | * A safe alternative to popen | 12 | * A safe alternative to popen |
13 | * | 13 | * |
14 | * Provides spopen and spclose | 14 | * Provides spopen and spclose |
15 | * | 15 | * |
16 | * FILE * spopen(const char *); | 16 | * FILE * spopen(const char *); |
17 | * int spclose(FILE *); | 17 | * int spclose(FILE *); |
18 | * | 18 | * |
19 | * | 19 | * Code taken with liitle modification from "Advanced Programming for the Unix |
20 | * Code taken with liitle modification from "Advanced Programming for the Unix | 20 | * Environment" by W. Richard Stevens |
21 | * Environment" by W. Richard Stevens | 21 | * |
22 | * | 22 | * This is considered safe in that no shell is spawned, and the environment |
23 | * This is considered safe in that no shell is spawned, and the environment and | 23 | * and path passed to the exec'd program are essentially empty. (popen create |
24 | * path passed to the exec'd program are esstially empty. (popen create a shell | 24 | * a shell and passes the environment to it). |
25 | * and passes the environment to it). | 25 | * |
26 | * | 26 | * |
27 | * License Information: | 27 | * This program is free software: you can redistribute it and/or modify |
28 | * | 28 | * it under the terms of the GNU General Public License as published by |
29 | * This program is free software; you can redistribute it and/or modify | 29 | * the Free Software Foundation, either version 3 of the License, or |
30 | * it under the terms of the GNU General Public License as published by | 30 | * (at your option) any later version. |
31 | * the Free Software Foundation; either version 2 of the License, or | 31 | * |
32 | * (at your option) any later version. | 32 | * This program is distributed in the hope that it will be useful, |
33 | * | 33 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
34 | * This program is distributed in the hope that it will be useful, | 34 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
35 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 35 | * GNU General Public License for more details. |
36 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 36 | * |
37 | * GNU General Public License for more details. | 37 | * You should have received a copy of the GNU General Public License |
38 | * | 38 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
39 | * You should have received a copy of the GNU General Public License | 39 | * |
40 | * along with this program; if not, write to the Free Software | 40 | * $Id$ |
41 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 41 | * |
42 | * | 42 | *****************************************************************************/ |
43 | * $Id$ | ||
44 | * | ||
45 | ******************************************************************************/ | ||
46 | 43 | ||
47 | #include "common.h" | 44 | #include "common.h" |
48 | 45 | ||