[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: uname -s

From: Paul Eggert
Subject: Re: uname -s
Date: Fri Oct 25 03:32:02 2002

> From: address@hidden (Alfred M. Szmidt)
> Date: 24 Oct 2002 13:33:29 +0200
> According to POSIX, uname -s should print the "implementation of the
> operating system" [1], but according to GNU uname it should print the
> kernel name.  Is there a reason for this?

The coreutils maintainer and I discussed this with Richard Stallman in
September 2001, and we came up with the approach currently used in GNU
coreutils uname.

POSIX does not have the notion of "kernel", so it cannot provide much
guidance as to when to output the name of the operating system, or to
output the name of the kernel.  Historically, "uname -s" prints the
sysname component of what the `uname' system call returns, and we
didn't want to change that due to backward compatibility concerns.

So we loosely interpreted the POSIX phrase "implementation of the
operating system" to mean "kernel", and we added the "-o" option to
GNU uname to print the operating system name.  The operating system
name is currently determined by a heuristic at coreutils build time,
since there's no portable system call to determine it.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]