summaryrefslogtreecommitdiffstats
path: root/plugins/popen.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/popen.c')
-rw-r--r--plugins/popen.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/popen.c b/plugins/popen.c
index 94ad583f..04eb3881 100644
--- a/plugins/popen.c
+++ b/plugins/popen.c
@@ -114,7 +114,7 @@ spopen (const char *cmdstring)
114 argv = malloc (sizeof(char*)*argc); 114 argv = malloc (sizeof(char*)*argc);
115 115
116 if (argv == NULL) { 116 if (argv == NULL) {
117 printf ("Could not malloc argv array in popen()\n"); 117 printf (_("Could not malloc argv array in popen()\n"));
118 return NULL; 118 return NULL;
119 } 119 }
120 120
@@ -124,7 +124,7 @@ spopen (const char *cmdstring)
124 str += strspn (str, " \t\r\n"); /* trim any leading whitespace */ 124 str += strspn (str, " \t\r\n"); /* trim any leading whitespace */
125 125
126 if (i >= argc - 2) { 126 if (i >= argc - 2) {
127 printf ("CRITICAL - You need more args!!!\n"); 127 printf (_("CRITICAL - You need more args!!!\n"));
128 return (NULL); 128 return (NULL);
129 } 129 }
130 130
@@ -239,17 +239,19 @@ static int openmax = 0;
239#define OPEN_MAX_GUESS 256 /* if OPEN_MAX is indeterminate */ 239#define OPEN_MAX_GUESS 256 /* if OPEN_MAX is indeterminate */
240 /* no guarantee this is adequate */ 240 /* no guarantee this is adequate */
241 241
242
242void 243void
243popen_timeout_alarm_handler (int signo) 244popen_timeout_alarm_handler (int signo)
244{ 245{
245 if (signo == SIGALRM) { 246 if (signo == SIGALRM) {
246 kill (childpid[fileno (child_process)], SIGKILL); 247 kill (childpid[fileno (child_process)], SIGKILL);
247 printf ("CRITICAL - Plugin timed out after %d seconds\n", 248 printf (_("CRITICAL - Plugin timed out after %d seconds\n"),
248 timeout_interval); 249 timeout_interval);
249 exit (STATE_CRITICAL); 250 exit (STATE_CRITICAL);
250 } 251 }
251} 252}
252 253
254
253int 255int
254open_max (void) 256open_max (void)
255{ 257{
@@ -259,14 +261,13 @@ open_max (void)
259 if (errno == 0) 261 if (errno == 0)
260 openmax = OPEN_MAX_GUESS; /* it's indeterminate */ 262 openmax = OPEN_MAX_GUESS; /* it's indeterminate */
261 else 263 else
262 err_sys ("sysconf error for _SC_OPEN_MAX"); 264 err_sys (_("sysconf error for _SC_OPEN_MAX"));
263 } 265 }
264 } 266 }
265 return (openmax); 267 return (openmax);
266} 268}
267 269
268 270
269
270/* Fatal error related to a system call. 271/* Fatal error related to a system call.
271 * Print a message and die. */ 272 * Print a message and die. */
272 273
@@ -309,4 +310,3 @@ rtrim (char *str, const char *tok)
309 } 310 }
310 return str; 311 return str;
311} 312}
312