lkml.org 
[lkml]   [2015]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: perf: behavior of poll() changed in 3.18
On Wed, 21 Jan 2015, Jiri Olsa wrote:
>
> However if we revert this code, we'll loose nice (and standard) way
> to check if the event is still valid.. not sure how to handle this.

there's likely no need to revert as my code wasn't really released and
I've already fixed it to work with the new interface.

I was mostly asking just so I could update the manpage to explain the new
behavior, as tools that expect to be backwards compatible will have to
handle both ways of detecting a process dieing.

> > Part of why my code doesn't just exit on POLLHUP is because you can
> > get that result for reasons other than a process exit (for example,
> > if you are using ioctl(PERF_EVENT_IOC_REFRESH)
>
> Nope, this is related to POOL_HUP (notice the '_') which you'll get
> accompanied with SIGIO if you setup this.

So what happens if you are using a signal handler to monitor a child and
the child exits?

It's a shame the poll and signal handler interfaces are subtly different,
though I guess some of that is probably due to historical reasons.

Vince


\
 
 \ /
  Last update: 2015-01-22 08:01    [W:0.100 / U:1.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site