1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-05 13:18:20 +03:00

Add error diagnostic for setenv failure.

This commit is contained in:
Zdenek Kabelac 2010-04-13 20:54:57 +00:00
parent b409df00a9
commit 6ea4f7dfc0
2 changed files with 4 additions and 2 deletions

View File

@ -365,7 +365,8 @@ int main(int argc, char *argv[])
* used by some glibc (on some distributions it takes over 100MB). * used by some glibc (on some distributions it takes over 100MB).
* Daemon currently needs to use mlockall(). * Daemon currently needs to use mlockall().
*/ */
setenv("LANG", "C", 1); if (setenv("LANG", "C", 1) != 0)
perror("Can not set LANG to C");
/* Fork into the background (unless requested not to) */ /* Fork into the background (unless requested not to) */
if (debug != DEBUG_STDERR) { if (debug != DEBUG_STDERR) {

View File

@ -1703,7 +1703,8 @@ int main(int argc, char *argv[])
* used by some glibc (on some distributions it takes over 100MB). * used by some glibc (on some distributions it takes over 100MB).
* Daemon currently needs to use mlockall(). * Daemon currently needs to use mlockall().
*/ */
setenv("LANG", "C", 1); if (setenv("LANG", "C", 1) != 0)
perror("Can not set LANG to C");
if (!_debug) if (!_debug)
_daemonize(); _daemonize();