[X-Unix] Find if shutdown is in progress
Juan Manuel Palacios
jmpalaciosp at eml.cc
Mon Apr 11 11:25:22 PDT 2011
On Mar 28, 2011, at 3:27 PM, Jerry Krinock wrote:
>
> On 2011 Mar 25, at 12:33, Michael Wheeler wrote:
>
>> Not sure if this will work or not but have you tried checking the runlevel?
>>
>> who -r
>
> Thank you, Michael. I just tried that but its output ("run-level 3") stays the same even during the shutdown process.
>
It's well known that some times man pages don't really help much, but in this case it's a bit hard to overlook:
WHO(1) BSD General Commands Manual WHO(1)
NAME
who -- display who is logged in
(...)
-r Print the current runlevel. This is meaningless on Mac OS X.
So I seriously doubt you'll get any info from who(1) that might interest you. All in all, runlevels are a SYSV UNIX thing (later on implemented by Linux as well), while Mac OS X is derived from BSD UNIX, the opposing branch in the infamous UNIX wars back in 'them years.
Regards,
- jmpp
More information about the X-Unix
mailing list