blob: a53d3102722021be543dde43d1044f9258285f45 [file] [log] [blame]
bigbiff bigbiffe60683a2013-02-22 20:55:50 -05001#ifndef UTIL_LINUX_ENV_H
2#define UTIL_LINUX_ENV_H
3
4#include "c.h"
5
6extern void sanitize_env(void);
7extern char *safe_getenv(const char *arg);
8
9static inline void xsetenv(char const *name, char const *val, int overwrite)
10{
11 if (setenv(name, val, overwrite) != 0)
12 err(EXIT_FAILURE, "failed to set the %s environment variable", name);
13}
14
15#endif /* UTIL_LINUX_ENV_H */
16