bug-coreutils
[Top][All Lists]
Advanced

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

Re: who(1) exit status


From: Eric Blake
Subject: Re: who(1) exit status
Date: Mon, 23 Jun 2008 07:05:23 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080421 Thunderbird/2.0.0.14 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Bo Borgerson on 6/23/2008 6:59 AM:
| So it sounds like there's no portable way to distinguish between:
|
| 1. an error trying to look up information
| 2. no information to be found
|
| Would it make sense, though, to return a nonzero exit code when output
| is empty in either case?

POSIX requires an error message to stderr explaining the non-zero status.
~ What would we report?  On the other hand, it seems like we should always
expect at least the current user to be logged in (otherwise, how is who
being invoked?), so the idea of an error on no output seems reasonable to me.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhfn5MACgkQ84KuGfSFAYAnrgCeJ0WOSnhrnod/CkUKtvl9iFVP
JIQAoNYTI9uSejXynBindVCIOD8rLFgr
=j4OM
-----END PGP SIGNATURE-----




reply via email to

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