Use uname instead of /proc for reading the system hostname

This commit is contained in:
Steven Barth 2008-10-30 12:18:52 +00:00
parent 50442d7438
commit fefe7c0f5d

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.