Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
dd18fe34
Commit
dd18fe34
authored
6 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system/SignalFD: throw exception on error
parent
5b09504a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
SignalMonitor.hxx
src/event/SignalMonitor.hxx
+2
-0
SignalFD.cxx
src/system/SignalFD.cxx
+2
-2
SignalFD.hxx
src/system/SignalFD.hxx
+2
-1
No files found.
src/event/SignalMonitor.hxx
View file @
dd18fe34
...
@@ -32,6 +32,8 @@ typedef BoundMethod<void()> SignalHandler;
...
@@ -32,6 +32,8 @@ typedef BoundMethod<void()> SignalHandler;
/**
/**
* Initialise the signal monitor subsystem.
* Initialise the signal monitor subsystem.
*
* Throws on error.
*/
*/
void
void
SignalMonitorInit
(
EventLoop
&
loop
);
SignalMonitorInit
(
EventLoop
&
loop
);
...
...
This diff is collapsed.
Click to expand it.
src/system/SignalFD.cxx
View file @
dd18fe34
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
#include "config.h"
#include "config.h"
#ifdef USE_SIGNALFD
#ifdef USE_SIGNALFD
#include "SignalFD.hxx"
#include "SignalFD.hxx"
#include "
Fatal
Error.hxx"
#include "Error.hxx"
#include <assert.h>
#include <assert.h>
#include <sys/signalfd.h>
#include <sys/signalfd.h>
...
@@ -29,7 +29,7 @@ void
...
@@ -29,7 +29,7 @@ void
SignalFD
::
Create
(
const
sigset_t
&
mask
)
SignalFD
::
Create
(
const
sigset_t
&
mask
)
{
{
if
(
!
fd
.
CreateSignalFD
(
&
mask
))
if
(
!
fd
.
CreateSignalFD
(
&
mask
))
FatalSystemError
(
"signalfd() failed"
);
throw
MakeErrno
(
"signalfd() failed"
);
}
}
int
int
...
...
This diff is collapsed.
Click to expand it.
src/system/SignalFD.hxx
View file @
dd18fe34
...
@@ -35,9 +35,10 @@ public:
...
@@ -35,9 +35,10 @@ public:
/**
/**
* Create the signalfd or update its mask.
* Create the signalfd or update its mask.
*
*
*
All errors are fatal
.
*
Throws on error
.
*/
*/
void
Create
(
const
sigset_t
&
mask
);
void
Create
(
const
sigset_t
&
mask
);
void
Close
()
{
void
Close
()
{
fd
.
Close
();
fd
.
Close
();
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment