summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 30c81e1)
raw | patch | inline | side by side (parent: 30c81e1)
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Fri, 1 Aug 2003 06:01:50 +0000 (06:01 +0000) | ||
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Fri, 1 Aug 2003 06:01:50 +0000 (06:01 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@625 f882894a-f735-0410-b71e-b25c423dba1c
plugins/popen.c | patch | blob | history |
diff --git a/plugins/popen.c b/plugins/popen.c
index d4151e6142338c01933edb69548e987b2b79ed3d..e41ae9ae7f4dd975322653b59ee4204b4867c3a5 100644 (file)
--- a/plugins/popen.c
+++ b/plugins/popen.c
FILE *
spopen (const char *cmdstring)
{
- char *environ[] = { NULL };
+ char *env[] = { "LC_ALL=C", (char*)0 };
char *cmd = NULL;
char **argv = NULL;
char *str;
if (childpid[i] > 0)
close (i);
- execve (argv[0], argv, environ);
+ execve (argv[0], argv, env);
_exit (0);
}
int
spclose (FILE * fp)
{
- int fd, stat;
+ int fd, status;
pid_t pid;
if (childpid == NULL)
if (fclose (fp) == EOF)
return (1);
- while (waitpid (pid, &stat, 0) < 0)
+ while (waitpid (pid, &status, 0) < 0)
if (errno != EINTR)
return (1); /* error other than EINTR from waitpid() */
- if (WIFEXITED (stat))
- return (WEXITSTATUS (stat)); /* return child's termination status */
+ if (WIFEXITED (status))
+ return (WEXITSTATUS (status)); /* return child's termination status */
return (1);
}