9 |
|
#include "Matcher/Matcher.hpp" |
10 |
|
|
11 |
|
#include <menes-api/exename.hpp> |
12 |
– |
#include <menes-api/files.hpp> |
12 |
|
#include <menes-app/application.hpp> |
13 |
|
|
14 |
|
extern "C" |
15 |
|
{ |
16 |
|
#include <sys/types.h> |
18 |
– |
#include <unistd.h> |
17 |
|
#include <signal.h> |
18 |
|
} |
19 |
|
|
66 |
|
Mounter mounter(config); |
67 |
|
Unmounter unmounter(config); |
68 |
|
|
69 |
< |
daemons.InsertLast(static_cast<Daemon*>(&mounter)); |
70 |
< |
daemons.InsertLast(static_cast<Daemon*>(&unmounter)); |
69 |
> |
daemons.InsertLast(dynamic_cast<Daemon*>(&mounter)); |
70 |
> |
daemons.InsertLast(dynamic_cast<Daemon*>(&unmounter)); |
71 |
|
|
72 |
|
{ |
73 |
|
struct ::sigaction action; |
82 |
|
|
83 |
|
api::Posix::CheckError(::sigaction(SIGTERM, &action, NULL)); |
84 |
|
} |
85 |
+ |
|
86 |
+ |
_mforeach (ext::Vector<Daemon*>, daemon, daemons) (*daemon)->start(); |
87 |
+ |
_mforeach (ext::Vector<Daemon*>, daemon, daemons) (*daemon)->wait(); |
88 |
|
} |
89 |
|
|
90 |
|
Spectre2::~Spectre2() |