]> git.ipfire.org Git - thirdparty/util-linux.git/commit
write: remove unnecessary utmp variables
authorSami Kerola <kerolasa@iki.fi>
Sat, 7 May 2016 11:50:01 +0000 (12:50 +0100)
committerSami Kerola <kerolasa@iki.fi>
Fri, 1 Jul 2016 20:17:25 +0000 (21:17 +0100)
commitc1d0a95eea8a1e3f05d78f734f0c93ef97b6b7e5
tree407c74809c8de1a0b7332445094100af93796ae8
parentd732758e6548b65a6bab5dffc35301f466eec416
write: remove unnecessary utmp variables

glibc documentation tells getutent() calls are not thread safe, and
recommends to copy the context of the structures when information is wished
to be stored.  This leads to excessive copying, that in this case is not
relevant.  write(1) is single threaded program and there is no reason to
assume this would change in future.

Reference: http://www.gnu.org/software/libc/manual/html_node/Manipulating-the-Database.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
term-utils/write.c