[LTP] [PATCH] lib/tst_test.c: Bugfix for heartbeat
Cyril Hrubis
chrubis@suse.cz
Tue Apr 13 13:32:52 CEST 2021
Hi!
> Thanks for your review!
>
> > > + } else
> > > + kill(getppid(), SIGUSR1);
> >
> > No need for the else branch here now that we do exit() a the end of the if
> > () block.
> >
>
> Generally speaking, It seems that we also need the else branch since we need to send heart beat to the main process.
What I meant was that the code could be structured as:
if (getppid() == 1) {
...
exit(TBROK);
}
kill(getppid(), SIGUSR1);
Hence there is no need for the else branch.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list