Module: xenomai-forge Branch: next Commit: 20baace374347d445f7bce6ddb334da962d4b912 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=20baace374347d445f7bce6ddb334da962d4b912
Author: Matthias Schneider <ma30002...@yahoo.de> Date: Mon Mar 24 15:02:39 2014 +0100 copperplate/notifier: fix misdirected notification signal Use F_SETOWN_EX to go back to pre-2.6.12 behavior of F_SETOWN with respect to targeted signal delivery. See: http://www.xenomai.org/pipermail/xenomai/2014-March/030357.html https://lkml.org/lkml/2009/8/6/223 --- lib/copperplate/notifier.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/copperplate/notifier.c b/lib/copperplate/notifier.c index 99bb8b6..86744d4 100644 --- a/lib/copperplate/notifier.c +++ b/lib/copperplate/notifier.c @@ -140,6 +140,7 @@ int notifier_init(struct notifier *nf, int owned) { pthread_mutexattr_t mattr; + struct f_owner_ex owner; sigset_t oset; int fd, ret; @@ -176,7 +177,9 @@ int notifier_init(struct notifier *nf, fd = nf->psfd[0]; fcntl(fd, F_SETSIG, NOTIFYSIG); - fcntl(fd, F_SETOWN, nf->owner); + owner.type = F_OWNER_TID; + owner.pid = nf->owner; + fcntl(fd, F_SETOWN_EX, &owner); fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_ASYNC | O_NONBLOCK); fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); /* _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git