From: Ulrich Drepper I'm not entirely sure about this change. But it seems to be necessary. The dnotify code stores the PID in the file structure. The entire process shares the file and any signal (is it used for that?) should be sent to the process (thread group), not the individual thread. Also keep in mind that threads can go away while the process (and therefore file descriptor) remain. And the ID of the thread can be reused. Somebody who knows this code should take a good look. (Looks right to me...) 25-akpm/fs/dnotify.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN fs/dnotify.c~dnotify-use-tgid fs/dnotify.c --- 25/fs/dnotify.c~dnotify-use-tgid Thu Aug 28 11:44:59 2003 +++ 25-akpm/fs/dnotify.c Thu Aug 28 11:44:59 2003 @@ -94,7 +94,7 @@ int fcntl_dirnotify(int fd, struct file prev = &odn->dn_next; } - error = f_setown(filp, current->pid, 1); + error = f_setown(filp, current->tgid, 1); if (error) goto out_free; _