FAM: FAMOpen(3X) fails but cause is not shown

The following C program fails and I can't find why.

/* famcheck.c */
#include <fam.h>
#include <stdio.h>
#include <stdlib.h>

void error(const char *msg)
	int e = FAMErrno;
	fprintf(stderr, "FAMErrno=%d\n", e);

int main()
	FAMConnection fc;
	if (FAMOpen(&fc) != 0)
	if (FAMClose(&fc) != 0)

It was compiled this way: gcc -g -Wall famcheck.c -lfam

It displays this:

    FAMOpen: Success

I am not surprised to see that both errno and FAMErrno are zero,
since that seems to be a known (and tolerated) bug with FAM.

However, I have no information to determine the cause of the failure.
Nothing appears in /var/log/messages or in /var/log/secure.

When I give the command

    touch ~/Desktop/foobar

the Nautilus desktop shows an icon for that file about 3 seconds
later.  This seems to indicate that the fam service is running.

/sbin/service says that the "xinetd" and "portmap" services are

I have a Fedora Core 2 system with fam-2.6.10-9 and portmap-4.0-59.

The /etc/xinetd.d/sgi_fam file contains this:

# default: off
# description: FAM is a file monitoring daemon. It can \
# be used to get reports when files change.
# The daemon conflicts with selinux, so you must boot
# with selinux disabled to use this.
service sgi_fam
	type         = RPC UNLISTED
        socket_type  = stream
        user         = root
        group        = nobody
        server       = /usr/bin/fam
	wait	     = yes
	protocol     = tcp
	rpc_version  = 2
	rpc_number   = 391002
	bind         =
	disable      = no

(Isn't selinux disabled by default on Fedora Core 2?)

The /etc/grub.conf file contains this:

# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,0)
#          kernel /boot/vmlinuz-version ro root=/dev/hda1
#          initrd /boot/initrd-version.img
title Fedora Core (2.6.5-1.358)
	root (hd0,0)
	kernel /boot/vmlinuz-2.6.5-1.358 ro root=/dev/hda1
	initrd /boot/initrd-2.6.5-1.358.img

I was initially trying to use gnome_vfs_monitor_add(),
but this function failed with a GnomeVFSResult equal to

Pierre Sarrazin <sarrazip at sympatico dot ca>

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