From: Karel Zak Date: Wed, 3 Apr 2013 14:14:47 +0000 (+0200) Subject: blkid: use O_CLOEXEC X-Git-Tag: v2.23-rc2~75 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3b1346a877bd9c45699394a52f8ebb8e7851d742;p=thirdparty%2Futil-linux.git blkid: use O_CLOEXEC ... to make "strace -e open blkid" for libblkid stuff without exceptions. Signed-off-by: Karel Zak --- diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c index fd27da7f04..f67ee4490b 100644 --- a/misc-utils/blkid.c +++ b/misc-utils/blkid.c @@ -493,7 +493,7 @@ static int lowprobe_device(blkid_probe pr, const char *devname, int rc = 0; static int first = 1; - fd = open(devname, O_RDONLY); + fd = open(devname, O_RDONLY|O_CLOEXEC); if (fd < 0) { fprintf(stderr, "error: %s: %m\n", devname); return BLKID_EXIT_NOTFOUND;