[LTP] [PATCH v4] Refactor pidns30 test using new LTP API
Richard Palethorpe
rpalethorpe@suse.de
Tue Feb 14 13:27:50 CET 2023
Hello,
Cyril Hrubis <chrubis@suse.cz> writes:
> 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...
Indeed, I shouldn't have merged that.
>
> --
> Cyril Hrubis
> chrubis@suse.cz
--
Thank you,
Richard.
More information about the ltp
mailing list