Use uname instead of /proc for reading the system hostname

This commit is contained in:
Steven Barth 2008-10-30 13:13:38 +00:00
parent d69e2df945
commit 04cac6936e

View file

@ -132,7 +132,7 @@ getenv = posix.getenv
--- Determine the current hostname.
-- @return String containing the system hostname
function hostname()
return io.lines("/proc/sys/kernel/hostname")()
return posix.uname("%n")
end
--- Returns the contents of a documented referred by an URL.