summaryrefslogtreecommitdiffstats
path: root/lib/libedit/tty.h
diff options
context:
space:
mode:
authorscf <scf@FreeBSD.org>2007-07-04 00:00:41 +0000
committerscf <scf@FreeBSD.org>2007-07-04 00:00:41 +0000
commit196b6346ba4e13a3f7679e2de3317b6aa65983df (patch)
tree423c7d016f87f6541b9ef8231a14f8b267bc5d5e /lib/libedit/tty.h
parentaf5bbfbc7b6a610f0c44a56a7b2d81b96be9b1b5 (diff)
downloadFreeBSD-src-196b6346ba4e13a3f7679e2de3317b6aa65983df.zip
FreeBSD-src-196b6346ba4e13a3f7679e2de3317b6aa65983df.tar.gz
Significantly reduce the memory leak as noted in BUGS section for
setenv(3) by tracking the size of the memory allocated instead of using strlen() on the current value. Convert all calls to POSIX from historic BSD API: - unsetenv returns an int. - putenv takes a char * instead of const char *. - putenv no longer makes a copy of the input string. - errno is set appropriately for POSIX. Exceptions involve bad environ variable and internal initialization code. These both set errno to EFAULT. Several patches to base utilities to handle the POSIX changes from Andrey Chernov's previous commit. A few I re-wrote to use setenv() instead of putenv(). New regression module for tools/regression/environ to test these functions. It also can be used to test the performance. Bump __FreeBSD_version to 700050 due to API change. PR: kern/99826 Approved by: wes Approved by: re (kensmith)
Diffstat (limited to 'lib/libedit/tty.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud