[LTP] [PATCH] syscalls/dup202: make sure fds are not equal to ofd
Cyril Hrubis
chrubis@suse.cz
Fri Dec 17 16:24:52 CET 2021
Hi!
> If the test is executed by a process which has many open file descriptors,
> creat may end up returning ofd == 10, which it will try to dup2 to, and,
> then, SAFE_CLOSE will be run twice over fd=10, making it fail the second
> time.
Applied, thanks.
However it may be a good idea to fix your test executor to open file
descriptors with O_CLOEXEC so that they do not leak into the test
processes.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list