clearenv.c\env\src - musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/env/clearenv.c
blob: db8e8e94b8e0c5cef544216129bebe724a4f6d85 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#define _GNU_SOURCE
#include <stdlib.h>
#include <unistd.h>
static void dummy(char *old, char *new) {}
weak_alias(dummy, __env_rm_add);
int clearenv()
{
	char **e = __environ;
	__environ = 0;
	if (e) while (*e) __env_rm_add(*e++, 0);
	return 0;
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月03日 23:03:45 +0000

AltStyle によって変換されたページ (->オリジナル) /