diff options
author | Karel Zak | 2013-04-03 16:14:47 +0200 |
---|---|---|
committer | Karel Zak | 2013-04-03 16:14:47 +0200 |
commit | 3b1346a877bd9c45699394a52f8ebb8e7851d742 (patch) | |
tree | 0e134d6deff0791659e96b7b0b3a8a69db8fdb14 /misc-utils | |
parent | libblkid: use O_CLOEXEC (diff) | |
download | kernel-qcow2-util-linux-3b1346a877bd9c45699394a52f8ebb8e7851d742.tar.gz kernel-qcow2-util-linux-3b1346a877bd9c45699394a52f8ebb8e7851d742.tar.xz kernel-qcow2-util-linux-3b1346a877bd9c45699394a52f8ebb8e7851d742.zip |
blkid: use O_CLOEXEC
... to make "strace -e open blkid" for libblkid stuff without
exceptions.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils')
-rw-r--r-- | misc-utils/blkid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c index fd27da7f0..f67ee4490 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; |