Re: [PATCH] perf stat: Fix endless wait for child process

2019-01-03 Thread Arnaldo Carvalho de Melo
Em Thu, Jan 03, 2019 at 12:12:05PM +0100, Jiri Olsa escreveu: > On Thu, Jan 03, 2019 at 03:40:45PM +0800, Jin Yao wrote: > > We hit a perf stat issue by using following script. > > > > #!/bin/bash > > > > sleep 1000 & > > exec perf stat -a -e cycles -I1000 -- sleep 5 > > > > Since "perf

Re: [PATCH] perf stat: Fix endless wait for child process

2019-01-03 Thread Jiri Olsa
On Thu, Jan 03, 2019 at 03:40:45PM +0800, Jin Yao wrote: > We hit a perf stat issue by using following script. > > #!/bin/bash > > sleep 1000 & > exec perf stat -a -e cycles -I1000 -- sleep 5 > > Since "perf stat" is launched by exec, so the "sleep 1000" would be > the child process of

[PATCH] perf stat: Fix endless wait for child process

2019-01-02 Thread Jin Yao
We hit a perf stat issue by using following script. #!/bin/bash sleep 1000 & exec perf stat -a -e cycles -I1000 -- sleep 5 Since "perf stat" is launched by exec, so the "sleep 1000" would be the child process of "perf stat". The wait4() will not return because it's waiting for the child