At 2025-04-04T00:46:03+0200, Chris Hofstaedtler wrote: > PS: I never understood why there's both w and who, and why they are > different implementations.
As I understand it, it's the same reason as why more(1) vs. pg(1) and why lp(1) vs. lpd(1)--the AT&T/USG/USL vs. BSD schism. who(1) goes all the way back to "First Edition" Unix (1971). https://minnie.tuhs.org/cgi-bin/utree.pl?file=V1/man/man1/who.1 w(1) came along much later, in 3BSD (late 1979). https://minnie.tuhs.org/cgi-bin/utree.pl?file=3BSD/usr/man/man1/w.1 About that time, the BSD/USG Unix split occurred. AT&T's Unix System III (1980) did not incorporate the Berkeley CSRG's w(1); instead they aped it with a now-forgotten administrative utility called whodo(1). https://minnie.tuhs.org/cgi-bin/utree.pl?file=SysIII/usr/src/man/man1/whodo.1m System III became System V (1982), which continued to eschew w(1) along with numerous other Berkeley CSRG innovations for much of the duration of its commercial relevance. In places where ecumenicism was more important, as with Research Unix (the AT&T CSRC at Murray Hill, New Jersey, where Unix was born), some "vendor" Unices like Sequent's DYNIX (with its two "universes" either of which any given user [or process?] could be assigned), and eventually Unix System V Release 4.2 (1992)--I think--and Solaris, the two utilities came to coexist. Supporting both was a Simple Matter of Programming, especially once kernel development settled down. ...and, as I understand it, the kernel was why there were different utilities in the first place. AT&T USG/USL and Berkeley had divergent concerns and development priorities in the Unix kernel itself. Back in those days, utilities like ps(1)--and I think who(1) and w(1) as well--had to be setuid root so that they could read kernel memory. This was in the days before /proc. It took a while for the idea of a pseudo-file system to expose kernel memory structures to user space in a stable and safe way to come to fruition. Since there was no API for obtaining process or user session information, the different development organizations, with their divergent kernels, changed what ever they needed to in the kernel to achieve other objectives, like implementing virtual memory with demand paging, or supporting symmetric multiprocessing. Regards, Branden
signature.asc
Description: PGP signature