15

In the 2016 edition of IEEE Std 1003.1-2008 (a.k.a. The Open Group Base Specifications Issue 7, or just the POSIX standard), the Rationale section of the who utility mentions the following:

It is acceptable for an implementation to produce no output for an invocation of who mil.

Who or what is "mil"? Why is an implementation allowed to produce no output for who mil?

4
  • 3
    That's military. Dec 10, 2016 at 14:49
  • 1
    Mother in law? ;-)
    – jlliagre
    Dec 10, 2016 at 15:39
  • It would make sense if it read who -ml.
    – JdeBP
    Dec 11, 2016 at 0:10
  • Perhaps "mil" is a placeholder for any word. My who produces no output for who mil, who unix SE, who GnP and anything else I threw at it. Not even who am i made it tick. GNU Coreutils 8.25-2ubuntu2.
    – GnP
    Dec 20, 2016 at 1:04

1 Answer 1

1

Reading the man page of "who", it says the first positional argument represents the file which is to be read. Adding the argument "mil" tells "who" to open "./mil" and inspect it for login information...since there (presumably) is no such file, it outputs nothing...as if there were no users logged in. I suppose it could output some useful error messages, but that may be counterproductive. E.g., imagine the case where the system has just started, and no users have yet signed in. In that case, the login file would be empty or non-existent. Thus, the proper output from "who" is "no response" (i.e. no users are signed in) instead of a misleading error message.

2
  • It crossed my mind, but I don't think this is the answer per se. First, file arguments are an XSI extension, and I'm not sure if this feature was included in early versions of who (I'd have to disassemble UNIX v1's utilities to see. Furthermore, as the other XSI extension who am i breaks this pattern, I wouldn't be so quick expect who mil to read a file; it might just be a similar easter egg.
    – Rhymoid
    Dec 22, 2016 at 18:16
  • Who accepted a file argument as early as V3. I think the posix standard just has a typo and they meant to say "who file". Dec 23, 2016 at 23:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .