From owner-freebsd-questions Tue Jun 23 17:48:46 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA16485 for freebsd-questions-outgoing; Tue, 23 Jun 1998 17:48:46 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from ms11.hinet.net (root@ms11.hinet.net [168.95.4.11]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA16469 for ; Tue, 23 Jun 1998 17:48:41 -0700 (PDT) (envelope-from jwlo@ms11.hinet.net) Received: from ms11.hinet.net (h143.s9.ts32.hinet.net [163.32.9.143]) by ms11.hinet.net (8.8.8/8.8.8) with ESMTP id IAA27948; Wed, 24 Jun 1998 08:48:01 +0800 (CST) Message-ID: <35904BBD.2F3A88E2@ms11.hinet.net> Date: Wed, 24 Jun 1998 08:43:42 +0800 From: Doug Lo X-Mailer: Mozilla 4.05 [en] (X11; I; FreeBSD 2.2.6-RELEASE i386) MIME-Version: 1.0 To: Greg Lehey CC: spork , freebsd-questions@FreeBSD.ORG Subject: Re: HELP! "who" hangs system. References: <3588CD5A.51BED253@ms11.hinet.net> <19980618183245.36149@papillon.lemis.com> <358C78E8.4AEEA6B7@ms11.hinet.net> <19980623121745.A27719@freebie.lemis.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Greg, Thank you for taking the time to explain. Maybe my 'who' program has bugs, I'll check it out. Thanks again, Doug. Greg Lehey wrote: > On Sun, 21 June 1998 at 11:07:20 +0800, Doug Lo wrote: > > Greg Lehey wrote: > > > >> On Thu, 18 June 1998 at 16:18:35 +0800, Doug Lo wrote: > >>> spork wrote: > >>> > >>>> Is the system totally hung, or is it just the terminal in which you're > >>>> running 'who'? > >>> > >>> The system is totally hung, I should press "Ctrl-C" to interrupt. :-( > >> > >> You can't get out of a hung system, or even a hung terminal, with ^C. > >> This is just a hung program. > > > > Thanks for the reply. But I have a question what you said:"This is just a hung > > program". > > Would you explain more details, what's a 'humg' program? > > You mean I can't press ^C to terminate the 'who'? > > I thought you said you *could* press ^C and terminate the 'who' > process. > > Let's get some terminology straight: UNIX is an operating system. It > consists of a kernel and user programs. The kernel is started when > you boot and controls execution of programs. When you start a > program, you create what is called a process. A process is an > instance of a running program. You can start the same program more > than once, in which case you have more than one process, but only one > program. Thus, strictly speaking, you can't stop a program, only a > process. > > The kernel runs in a privileged, protected mode. Ideally, there's no > way to stop it except to shut down the system. In practice, it's also > possible (though difficult) to either stop it executing with a panic > (a situation in which the kernel finds it can't continue) or a hang (a > situation in which the kernel doesn't continue). Most kernel hangs > are only partial: processes waiting on particular resources can't > continue, and you may not be able to stop them. In this case, you > need to reboot, with a shutdown if you can still get a reaction from a > virtual terminal, or forcibly via the reset button if not. All such > situations represent some kind of bug, though it's not really clear > that it's a kernel bug if the system hangs because you can't access > the (failed) system disk. > > If a process doesn't react, on the other hand, this is not necessarily > a bug. In the case I think you were talking about, it may have been > waiting for some event which would never happen. In this case, it > should still continue if you send it a signal, such as SIGQUIT, which > you can generate with the ^C key. If it still reacts to ^C, it's not > a kernel bug, though it could be a program bug. > > Looking back over this, I don't know if I have succeeded in making > myself clear. When I clear out the 1000 mail messages waiting for me, > things might be better. Ask again if you need any further > clarification. > > Greg > -- > See complete headers for address and phone numbers > finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message