summaryrefslogtreecommitdiffstats
path: root/plugins/runcmd.c
diff options
context:
space:
mode:
authorBenoit Mortier <opensides@users.sourceforge.net>2006-06-18 19:36:48 +0000
committerBenoit Mortier <opensides@users.sourceforge.net>2006-06-18 19:36:48 +0000
commitf9394308c9c372bcf419a311c61ba420247ae613 (patch)
tree616e0bebcbe821703dff207f7f1b704c2deae349 /plugins/runcmd.c
parentcbbfed30eb01a702b2e61c0abcb64c834e73d654 (diff)
downloadmonitoring-plugins-f9394308c9c372bcf419a311c61ba420247ae613.tar.gz
updating help and usage and license
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1434 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/runcmd.c')
-rw-r--r--plugins/runcmd.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/plugins/runcmd.c b/plugins/runcmd.c
index bc4ee08d..af12d224 100644
--- a/plugins/runcmd.c
+++ b/plugins/runcmd.c
@@ -1,6 +1,13 @@
1/* 1/****************************************************************************
2 * Nagios run command utilities
3 *
4 * License: GPL
5 * Copyright (c) 2005 nagios-plugins team
6 *
2 * $Id$ 7 * $Id$
3 * 8 *
9 * Description :
10 *
4 * A simple interface to executing programs from other programs, using an 11 * A simple interface to executing programs from other programs, using an
5 * optimized and safe popen()-like implementation. It is considered safe 12 * optimized and safe popen()-like implementation. It is considered safe
6 * in that no shell needs to be spawned and the environment passed to the 13 * in that no shell needs to be spawned and the environment passed to the
@@ -14,6 +21,21 @@
14 * function which isn't is np_runcmd_init() which it doesn't make sense to 21 * function which isn't is np_runcmd_init() which it doesn't make sense to
15 * call twice anyway, so the api as a whole should be considered async-safe. 22 * call twice anyway, so the api as a whole should be considered async-safe.
16 * 23 *
24 * License Information:
25 *
26 * This program is free software; you can redistribute it and/or modify
27 * it under the terms of the GNU General Public License as published by
28 * the Free Software Foundation; either version 2 of the License, or
29 * (at your option) any later version.
30 *
31 * This program is distributed in the hope that it will be useful,
32 * but WITHOUT ANY WARRANTY; without even the implied warranty of
33 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 * GNU General Public License for more details.
35 *
36 * You should have received a copy of the GNU General Public License
37 * along with this program; if not, write to the Free Software
38 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */ 39 */
18 40
19#define NAGIOSPLUG_API_C 1 41#define NAGIOSPLUG_API_C 1
@@ -137,7 +159,7 @@ np_runcmd_open(const char *cmdstring, int *pfd, int *pfderr)
137 argv = calloc(sizeof(char *), argc); 159 argv = calloc(sizeof(char *), argc);
138 160
139 if (argv == NULL) { 161 if (argv == NULL) {
140 printf (_("Could not malloc argv array in popen()\n")); 162 printf ("%s\n", _("Could not malloc argv array in popen()"));
141 return -1; 163 return -1;
142 } 164 }
143 165