summaryrefslogtreecommitdiff
path: root/libbb/xfuncs.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-10-03 15:57:40 +0000
committerDenis Vlasenko2006-10-03 15:57:40 +0000
commitfe54458e46eef445da32862b2171392be8f01ab4 (patch)
treef88b5ee99da5816f1628c9560cfabecb97468689 /libbb/xfuncs.c
parent7c1ed2e922e80b7a81da3e748cb975c876315bd5 (diff)
downloadbusybox-fe54458e46eef445da32862b2171392be8f01ab4.zip
busybox-fe54458e46eef445da32862b2171392be8f01ab4.tar.gz
runit/chpst: "change process state" utility
It's "nice" on steroids - can set uid/gid, mem/cpu limits etc. +3.5k
Diffstat (limited to 'libbb/xfuncs.c')
-rw-r--r--libbb/xfuncs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index 92091e5..7b95e49 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -255,6 +255,14 @@ int wait4pid(int pid)
}
#endif
+#ifdef L_xsetenv
+void xsetenv(const char *key, const char *value)
+{
+ if(setenv(key, value, 1))
+ bb_error_msg_and_die(bb_msg_memory_exhausted);
+}
+#endif
+
#ifdef L_itoa
// Convert unsigned integer to ascii, writing into supplied buffer. A
// truncated result is always null terminated (unless buflen is 0), and