From 71c3f623c6011c923788f0770ad40fe2756893a7 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 20 Apr 2019 02:51:51 -0500 Subject: New xsetenv() plumbing (repeatedly set same environment variables without leaking memory), and mod env command to test it. --- lib/lib.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/lib.h') diff --git a/lib/lib.h b/lib/lib.h index 6ec2c696..82c4c16e 100644 --- a/lib/lib.h +++ b/lib/lib.h @@ -261,7 +261,6 @@ int regexec0(regex_t *preg, char *string, long len, int nmatch, char *getusername(uid_t uid); char *getgroupname(gid_t gid); void do_lines(int fd, char delim, void (*call)(char **pline, long len)); -long environ_bytes(); long long millitime(void); char *format_iso_time(char *buf, size_t len, struct timespec *ts); void reset_env(struct passwd *p, int clear); @@ -272,6 +271,12 @@ void loggit(int priority, char *format, ...); #define HR_1000 4 // Use decimal instead of binary units int human_readable(char *buf, unsigned long long num, int style); +// env.c + +long environ_bytes(); +void xsetenv(char *name, char *val); +void xclearenv(void); + // linestack.c struct linestack { -- cgit v1.2.3