fam
[Top] [All Lists]

Re: [fam] client keeps on dying

To: "kennys@xxxxxxxxxxxxxxxxxxxxx" <kennys@xxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [fam] client keeps on dying
From: Michael Wardle <michael.wardle@xxxxxxxxxx>
Date: Wed, 09 Jan 2002 14:12:50 +1100
Cc: fam@xxxxxxxxxxx
Organization: Adacel Technologies
References: <3C3B9ED0.5000005@xxxxxxxxxxxxxxxxxxxxx>
Sender: owner-fam@xxxxxxxxxxx
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
kennys@xxxxxxxxxxxxxxxxxxxxx wrote:

I am fiddling around with the test program that comes with the download,
but at some point in time, the client stops for no obvious reasons.

So, I need to understand this little piece of code.

for ( ;  FAMPending(&fc); ) {
  if( FAMNextEvent(&fc, &fe) < 0 ) {
      printf("Gahh, FAMNextEvent() returned < 0 ! \n");
      exit(1);
  }
  processDirEvents(&fe);
  fflush(stdout);
}


okay what i need is to know
1. why the purpose of the if statement,
2. why it comes true as in what happens..
3. is there anyway to make sure that if statement never comes true


Okay, I've just had a quick look at the source. FAMPending and FAMNextEvent both come from libfam/fam.c++.

These are the steps that we go thru:
1. Do FAMPending() to see if there's an event waiting on our connection.
2. If there is, do FAMNextEvent() to try to process it.
3. If the event couldn't be processed, print an error message
   and exit.

So the answers to your questions:
1. To see whether the incoming event can be processed.
2. Perhaps the FAM daemon died.
3. Stop the FAM daemon from dying. ;-)

These are some of the things I would think about:
* architecture
* operating system
* compiler
* FAM version
* if there's anything weird about your system
  (such as non-standard partitioning, nearly full disks, ...)
* what kernel monitor you're using (imon/dnotify/other/none)
* how FAM was executed (shell/inetd/xinetd/other)
* how long FAM has been running for
* how long it takes for "test" to stop
* if you have any other FAM client programs running
* what command line you ran "test" with
* what file or directory you are monitoring
* what user you ran "test" as
* any error messages (screen/system log/other)
* whether it's reproducible

The more information about these points you can post here, the easier it will be to help me find the problem.

Regards.


--
MICHAEL WARDLE                |  WORK   +61-2-6024-2699
SGI Desktop & Admin Software  |  MOBILE +61-415-439-838
Adacel Technologies Limited   |  WEB    http://www.adacel.com/



--
Source code, list archive, and docs: http://oss.sgi.com/projects/fam/
To unsubscribe: echo unsubscribe fam | mail majordomo@xxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>