[CRIU] [PATCH 5/9] zdtm: pthread00 -- Fail if subthread can't be created
Cyrill Gorcunov
gorcunov at openvz.org
Fri Nov 23 09:25:40 EST 2012
On Fri, Nov 23, 2012 at 06:18:58PM +0400, Andrew Vagin wrote:
> On Fri, Nov 23, 2012 at 04:50:56PM +0400, Cyrill Gorcunov wrote:
> >
> > Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> > ---
> > test/zdtm/live/static/pthread00.c | 6 ++++--
> > 1 files changed, 4 insertions(+), 2 deletions(-)
> >
>
> > diff --git a/test/zdtm/live/static/pthread00.c b/test/zdtm/live/static/pthread00.c
> > index 384e0d5..38dad67 100644
> > --- a/test/zdtm/live/static/pthread00.c
> > +++ b/test/zdtm/live/static/pthread00.c
> > @@ -104,8 +104,10 @@ static void *thread_func_1(void *map)
> >
> > memcpy(tls_data, __tls_data, sizeof(tls_data));
> >
> > - if (pthread_create(&th, NULL, &thread_subfunc_1, map))
> > - perror("Cant create thread");
> > + if (pthread_create(&th, NULL, &thread_subfunc_1, map)) {
> > + fail("Can't pthread_create");
> > + exit(1);
> You wanna to say exit_group...
Well, the patch will fail even with plain exit() here.
More information about the CRIU
mailing list