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
29d05cdb
Commit
29d05cdb
authored
Feb 17, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unix/SignalHandlers: pass Instance to ...Init()
parent
322d6f2a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
Main.cxx
src/Main.cxx
+1
-1
SignalHandlers.cxx
src/unix/SignalHandlers.cxx
+4
-2
SignalHandlers.hxx
src/unix/SignalHandlers.hxx
+4
-4
No files found.
src/Main.cxx
View file @
29d05cdb
...
@@ -464,7 +464,7 @@ MainConfigured(const struct options &options, const ConfigData &raw_config)
...
@@ -464,7 +464,7 @@ MainConfigured(const struct options &options, const ConfigData &raw_config)
#ifndef ANDROID
#ifndef ANDROID
setup_log_output
();
setup_log_output
();
const
ScopeSignalHandlersInit
signal_handlers_init
(
instance
.
event_loop
);
const
ScopeSignalHandlersInit
signal_handlers_init
(
instance
);
#endif
#endif
instance
.
io_thread
.
Start
();
instance
.
io_thread
.
Start
();
...
...
src/unix/SignalHandlers.cxx
View file @
29d05cdb
...
@@ -18,13 +18,13 @@
...
@@ -18,13 +18,13 @@
*/
*/
#include "SignalHandlers.hxx"
#include "SignalHandlers.hxx"
#include "Instance.hxx"
#include "event/SignalMonitor.hxx"
#include "event/SignalMonitor.hxx"
#ifndef _WIN32
#ifndef _WIN32
#include "Log.hxx"
#include "Log.hxx"
#include "LogInit.hxx"
#include "LogInit.hxx"
#include "event/Loop.hxx"
#include "system/Error.hxx"
#include "system/Error.hxx"
#include "util/Domain.hxx"
#include "util/Domain.hxx"
...
@@ -56,8 +56,10 @@ handle_reload_event(void *) noexcept
...
@@ -56,8 +56,10 @@ handle_reload_event(void *) noexcept
#endif
#endif
void
void
SignalHandlersInit
(
EventLoop
&
loop
)
SignalHandlersInit
(
Instance
&
instance
)
{
{
auto
&
loop
=
instance
.
event_loop
;
SignalMonitorInit
(
loop
);
SignalMonitorInit
(
loop
);
#ifndef _WIN32
#ifndef _WIN32
...
...
src/unix/SignalHandlers.hxx
View file @
29d05cdb
...
@@ -20,18 +20,18 @@
...
@@ -20,18 +20,18 @@
#ifndef MPD_SIGNAL_HANDLERS_HXX
#ifndef MPD_SIGNAL_HANDLERS_HXX
#define MPD_SIGNAL_HANDLERS_HXX
#define MPD_SIGNAL_HANDLERS_HXX
class
EventLoop
;
struct
Instance
;
void
void
SignalHandlersInit
(
EventLoop
&
loop
);
SignalHandlersInit
(
Instance
&
instance
);
void
void
SignalHandlersFinish
()
noexcept
;
SignalHandlersFinish
()
noexcept
;
class
ScopeSignalHandlersInit
{
class
ScopeSignalHandlersInit
{
public
:
public
:
ScopeSignalHandlersInit
(
EventLoop
&
loop
)
{
ScopeSignalHandlersInit
(
Instance
&
instance
)
{
SignalHandlersInit
(
loop
);
SignalHandlersInit
(
instance
);
}
}
~
ScopeSignalHandlersInit
()
noexcept
{
~
ScopeSignalHandlersInit
()
noexcept
{
...
...
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