fam
[Top] [All Lists]

[fam] FAM on Solaris 8+

To: fam@xxxxxxxxxxx
Subject: [fam] FAM on Solaris 8+
From: "Mark R. Bowyer" <Moredhel@xxxxxxxxxxxxx>
Date: Wed, 7 Jun 2000 18:01:53 +0100 (BST)
Reply-to: "Mark R. Bowyer" <Moredhel@xxxxxxxxxxxxx>
Sender: owner-fam@xxxxxxxxxxx
Hi,

I downloaded Christian Kreibich's "fixed" version of fam recently, as I'm an 
Enlightenment on Solaris user and wanted to try out the latest EFM release.

Unfortunately, although I could get fam to compile, it tended to go nuts as 
soon 
as it was asked to do anything, ending in a rather messy SEGV =O(

By "go nuts" I mean I saw this line about a million times:

        fam[20332]: couldn't open /etc/mnttab for input

Knowing that it worked fine on Solaris 7, and with a truss output in hand, I 
realised the difference causing the problem was probably down to this Solaris 8 
feature:

        markbo@moredhel:.../markbo 33 ]df /etc/mnttab
        Filesystem            kbytes    used   avail capacity  Mounted on
        mnttab                     0       0       0     0%    /etc/mnttab
        markbo@moredhel:.../markbo 34 ]ls -l /etc/mnttab
        -r--r--r--  1 root  root  2791 02 Jun 2000  /etc/mnttab

And the truss showed an attempt - many attempts - to open it read/write.  So I 
did a bit of hunting and found this in the Solaris-fixed version of 
FileSystemTable.c++, line 120:

  #ifdef HAVE_SUN
      FILE *mtab = fopen(mtab_name, "r+");
  #else
      FILE *mtab = setmntent(mtab_name, "r+");
  #endif
  
Now, I couldn't see the need for "r+" for this, so I fixed it to be just "r".  
And with that, it all suddenly worked as expected.

So, I suppose my question is - why is fam attempting to open what should always 
be a read-only file as "r+", especially since it never attempts to write to it 
anyway?  Is this something that should be changed for all versions of fam, or 
just for use on Solaris 8 and above (I'm actually working on an Update beta 
release)?

Thanks for any comments on this,

---------My opinion - Not sane, intelligent or necessarily useful---------
o o                                          mailto:Moredhel@xxxxxxxxxxxxx 
/v\ark R. Bowyer.    http://Moredhel.i.am    mailto:Mark.Bowyer@xxxxxxxxxx
`-'  "Micro$oft have performed an illegal operation and will be shut down"



--
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>