From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] pan/ltp-pan.c: fix file descriptors leaks
Date: Mon, 9 Nov 2020 13:59:38 +0100 [thread overview]
Message-ID: <20201109125938.GC9991@yuki.lan> (raw)
In-Reply-To: <1604925271-4811-1-git-send-email-zhufy.jy@cn.fujitsu.com>
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
next prev parent reply other threads:[~2020-11-09 12:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-09 12:34 [LTP] [PATCH] pan/ltp-pan.c: fix file descriptors leaks Feiyu Zhu
2020-11-09 12:59 ` Cyril Hrubis [this message]
2020-11-10 1:30 ` Yang Xu
2020-11-10 2:56 ` Yang Xu
2020-11-10 10:26 ` Cyril Hrubis
2020-11-11 1:46 ` Yang Xu
2020-11-18 6:17 ` Yang Xu
2020-11-18 21:19 ` Petr Vorel
2020-11-19 3:00 ` Yang Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201109125938.GC9991@yuki.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.