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 |
|
|
15 |
– |
extern "C" |
16 |
– |
{ |
14 |
|
#include <sys/types.h> |
18 |
– |
#include <unistd.h> |
15 |
|
#include <signal.h> |
20 |
– |
} |
16 |
|
|
17 |
|
struct Spectre2Command : public app::Application |
18 |
|
{ |
63 |
|
Mounter mounter(config); |
64 |
|
Unmounter unmounter(config); |
65 |
|
|
66 |
< |
daemons.InsertLast(static_cast<Daemon*>(&mounter)); |
67 |
< |
daemons.InsertLast(static_cast<Daemon*>(&unmounter)); |
66 |
> |
daemons.InsertLast(dynamic_cast<Daemon*>(&mounter)); |
67 |
> |
daemons.InsertLast(dynamic_cast<Daemon*>(&unmounter)); |
68 |
|
|
69 |
|
{ |
70 |
|
struct ::sigaction action; |
79 |
|
|
80 |
|
api::Posix::CheckError(::sigaction(SIGTERM, &action, NULL)); |
81 |
|
} |
82 |
+ |
|
83 |
+ |
_mforeach (ext::Vector<Daemon*>, daemon, daemons) (*daemon)->start(); |
84 |
+ |
_mforeach (ext::Vector<Daemon*>, daemon, daemons) (*daemon)->wait(); |
85 |
|
} |
86 |
|
|
87 |
|
Spectre2::~Spectre2() |