Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.0:Staging:C:DVD
qalculate
0001-Fix-leaking-of-FDs-created-by-pipe.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Fix-leaking-of-FDs-created-by-pipe.patch of Package qalculate
From 34d7203c5b5c45d2140d01cd7131e51c3f9ef570 Mon Sep 17 00:00:00 2001 From: Fabian Vogt <fvogt@suse.com> Date: Tue, 8 May 2018 14:11:47 +0200 Subject: [PATCH] Fix leaking of FDs created by pipe Use pipe2 to pass O_CLOEXEC. --- libqalculate/util.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libqalculate/util.cc b/libqalculate/util.cc index a1d29b7..8ee8bcf 100644 --- a/libqalculate/util.cc +++ b/libqalculate/util.cc @@ -38,6 +38,7 @@ # include <initguid.h> # include <shlobj.h> #else +# include <fcntl.h> # include <utime.h> # include <unistd.h> # include <pwd.h> @@ -834,7 +835,7 @@ bool Thread::cancel() { Thread::Thread() : running(false), m_pipe_r(NULL), m_pipe_w(NULL) { pthread_attr_init(&m_thread_attr); int pipe_wr[] = {0, 0}; - if(pipe(pipe_wr) == 0) { + if(pipe2(pipe_wr, O_CLOEXEC) == 0) { m_pipe_r = fdopen(pipe_wr[0], "r"); m_pipe_w = fdopen(pipe_wr[1], "w"); } -- 2.16.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor