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

Cyril Hrubis chrubis@suse.cz
Mon Oct 31 14:46:12 CET 2022


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.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list