[LTP] [PATCH v4] Refactor pidns30 test using new LTP API

Cyril Hrubis chrubis@suse.cz
Tue Feb 14 13:07:10 CET 2023


Hi!
> >> +static void run(void)
> >>   {
> >> -	int status;
> >> -	char buf[5];
> >> -	pid_t cpid;
> >> +	const struct tst_clone_args args = { CLONE_NEWPID, SIGCHLD };
> >>   
> >> -	setup();
> >> +	remove_mqueue(mqd);
> >> +	received = 0;
> > I wonder if we really need to clear the flag here, as far as I can see
> > we only modify that variable in the child process and that shouldn't
> > propagate to parent, unless we pass CLONE_VM of course.
> Flag reset has been added to be 100% sure we are receiving the signal on 
> -i > 1.

My point was that the variable is only changed in the child process,
that means that this change will never make it back to the parent since
the whole VM is copy-on-write...

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list