mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Add error diagnostic for setenv failure.
This commit is contained in:
parent
b409df00a9
commit
6ea4f7dfc0
@ -365,7 +365,8 @@ int main(int argc, char *argv[])
|
||||
* used by some glibc (on some distributions it takes over 100MB).
|
||||
* 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) */
|
||||
if (debug != DEBUG_STDERR) {
|
||||
|
@ -1703,7 +1703,8 @@ int main(int argc, char *argv[])
|
||||
* used by some glibc (on some distributions it takes over 100MB).
|
||||
* 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)
|
||||
_daemonize();
|
||||
|
Loading…
Reference in New Issue
Block a user