mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 08:15:40 +02:00
Open sockets, files etc with FD_CLOEXEC
This commit is contained in:
parent
650d1f13f9
commit
a367895dc6
12 changed files with 32 additions and 32 deletions
|
@ -162,7 +162,7 @@ static void
|
|||
find_mount_points(const char *dev_path, mount_point_list_t *mount_points)
|
||||
{
|
||||
int fd = open("/proc/self/mountinfo", O_RDONLY | O_CLOEXEC);
|
||||
FILE *f = fd >= 0 ? fdopen(fd, "r") : NULL;
|
||||
FILE *f = fd >= 0 ? fdopen(fd, "re") : NULL;
|
||||
|
||||
if (fd < 0 || f == NULL) {
|
||||
LOG_ERRNO("failed to open /proc/self/mountinfo");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue