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

Bug#561880: linux-image-2.6-parisc64: inotify_add_watch does not give a unique watch descriptor

Package: linux-image-2.6-parisc64
Severity: important
Blocks: 558981

The attatched minimal test case shows these results:

on my i386 machine, it correctly gives two different numbers:
$ gcc test.c; ./a.out
First: 1
Second: 2

however on paer.debian.org (hppa):
$ gcc test.c; ./a.out
First: 1
Second: 1

Based on the manpage of inotify_add_watch, it sounds like the correct
behavior is to have different numbers. It seems that the author of
inotify-tools also interpreted it that way.

This bug is causing my package's tests to fail, which causes it to FTBFS:


Ryan Niebur
#include <sys/inotify.h>
#include <stdio.h>

int main()
    int fd, wd;

    fd = inotify_init ();
    wd = inotify_add_watch (fd,
                            IN_OPEN | IN_CLOSE);
    printf("First: %d\n", wd);
    inotify_rm_watch(fd, wd);
    wd = inotify_add_watch (fd,
                            IN_OPEN | IN_CLOSE);
    printf("Second: %d\n", wd);
    inotify_rm_watch(fd, wd);

Attachment: signature.asc
Description: Digital signature

Reply to: