[LTP] [PATCH] syscalls/fork02: new test for fork()

zhaogongyi zhaogongyi@huawei.com
Tue Nov 1 02:05:49 CET 2022


Hi Cyril,

> 
> Hi!
> > > > Verify that current workdir correctly inherited by child.
> > >
> > > Why test this?  Does fork() man-pages menthion this?
> > >
> >
> > Man-pages does not menthion this, and the other field inherited does
> not mentioned too.
> 
> I guess that this is described in POSIX in:
> 
> "The new process (child process) shall be an exact copy of the calling
> process (parent process) except as detailed below:"
> 
> at https://pubs.opengroup.org/onlinepubs/9699919799/
> 
> And there is nothing about working dir in the list of special cases hence
> working dir is exactly the same as for parent since it has to be exact copy
> of parent.
> 

It seems reasonable to not test the result of full inheritance from the parent process, otherwise there are a lot of testcases.

Regards,

Gongyi


More information about the ltp mailing list