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
d2a1294e
Commit
d2a1294e
authored
Dec 10, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Main: add struct Config, empty currently
parent
3d897f18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
Main.cxx
src/Main.cxx
+18
-4
No files found.
src/Main.cxx
View file @
d2a1294e
...
...
@@ -127,6 +127,16 @@ Context *context;
Instance
*
instance
;
struct
Config
{
};
gcc_const
static
Config
LoadConfig
()
{
return
{};
}
#ifdef ENABLE_DAEMON
static
void
...
...
@@ -383,7 +393,7 @@ int main(int argc, char *argv[])
#endif
static
int
mpd_main_after_fork
();
mpd_main_after_fork
(
const
Config
&
config
);
#ifdef ANDROID
static
inline
...
...
@@ -425,6 +435,8 @@ try {
ParseCommandLine
(
argc
,
argv
,
&
options
);
#endif
const
auto
config
=
LoadConfig
();
#ifdef ENABLE_DAEMON
glue_daemonize_init
(
&
options
);
#endif
...
...
@@ -468,12 +480,12 @@ try {
This must be run after forking; if dispatch is called before forking,
the child process will have a broken internal dispatch state. */
dispatch_async
(
dispatch_get_global_queue
(
DISPATCH_QUEUE_PRIORITY_DEFAULT
,
0
),
^
{
exit
(
mpd_main_after_fork
());
exit
(
mpd_main_after_fork
(
config
));
});
dispatch_main
();
return
EXIT_FAILURE
;
// unreachable, because dispatch_main never returns
#else
return
mpd_main_after_fork
();
return
mpd_main_after_fork
(
config
);
#endif
}
catch
(
const
std
::
exception
&
e
)
{
LogError
(
e
);
...
...
@@ -481,8 +493,10 @@ try {
}
static
int
mpd_main_after_fork
()
mpd_main_after_fork
(
const
Config
&
config
)
try
{
(
void
)
config
;
ConfigureFS
();
glue_mapper_init
();
...
...
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