[LTP] [PATCH] pan/ltp-pan.c: fix file descriptors leaks

Cyril Hrubis chrubis@suse.cz
Mon Nov 9 13:59:38 CET 2020


Hi!
> ltp-pan will leak file descriptors of fopen() into the child process
> of the test case, fix this problem by using mode "e" for fopen().

Looks good, however this is supported since glibc 2.7 and it does not
seem to be supported on musl libc either.

I guess that it would be better just to close these files after a fork
in the runchild() function, but that would mean that we would have to
pass all these files as paramters to the function as well.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list