perf: behavior of poll() changed in 3.18

From: Vince Weaver
Date: Tue Jan 20 2015 - 12:02:23 EST


Hello

Some of my code that used poll() on a perf_event fd broke sometime between
3.17 and current. (My perf_event_test validation testsuite caught this
too but I haven't been running it as regularly as I should).

I bisected this to:

commit 179033b3e064d2cd3f5f9945e76b0a0f0fbf4883
Author: Jiri Olsa <jolsa@xxxxxxxxxx>
Date: Thu Aug 7 11:48:26 2014 -0400

perf: Add PERF_EVENT_STATE_EXIT state for events with exited task


Before, when polling, my code would get a
result=0/WIFEXITED()
return when a child with events being polled exited.

Now instead I get a
result=1/POLLHUP
return.

Needless to say this broke my code. Is there a reason this change was
made?

Vince

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/