Fix OSX compiler errors
This commit is contained in:
parent
7d091ed504
commit
6108a64973
|
@ -54,7 +54,8 @@ final class PosixEventDriver(Loop : PosixEventLoop) : EventDriver {
|
|||
version (linux) alias WatcherDriver = InotifyEventDriverWatchers!EventsDriver;
|
||||
//else version (OSX) alias WatcherDriver = FSEventsEventDriverWatchers!EventsDriver;
|
||||
else alias WatcherDriver = PollEventDriverWatchers!EventsDriver;
|
||||
alias ProcessDriver = SignalEventDriverProcesses!Loop;
|
||||
version (linux) alias ProcessDriver = SignalEventDriverProcesses!Loop;
|
||||
else alias ProcessDriver = DummyEventDriverProcesses!Loop;
|
||||
|
||||
Loop m_loop;
|
||||
CoreDriver m_core;
|
||||
|
|
|
@ -6,19 +6,18 @@ import eventcore.drivers.posix.driver;
|
|||
import eventcore.drivers.posix.signals;
|
||||
import eventcore.internal.utils : nogc_assert, print;
|
||||
|
||||
import std.algorithm.comparison : among;
|
||||
import std.variant : visit;
|
||||
|
||||
import core.stdc.errno : errno, EAGAIN, EINPROGRESS;
|
||||
import core.sys.linux.sys.signalfd;
|
||||
import core.sys.posix.signal;
|
||||
import core.sys.posix.unistd : close, read, write, dup;
|
||||
import std.algorithm.comparison : among;
|
||||
import std.variant : visit;
|
||||
|
||||
|
||||
private enum SIGCHLD = 17;
|
||||
|
||||
final class SignalEventDriverProcesses(Loop : PosixEventLoop) : EventDriverProcesses {
|
||||
@safe: /*@nogc:*/ nothrow:
|
||||
import core.sys.linux.sys.signalfd;
|
||||
|
||||
private {
|
||||
static struct ProcessInfo {
|
||||
|
@ -290,3 +289,56 @@ final class SignalEventDriverProcesses(Loop : PosixEventLoop) : EventDriverProce
|
|||
return info.userData.ptr;
|
||||
}
|
||||
}
|
||||
|
||||
final class DummyEventDriverProcesses(Loop : PosixEventLoop) : EventDriverProcesses {
|
||||
@safe: /*@nogc:*/ nothrow:
|
||||
|
||||
this(Loop loop, EventDriverPipes pipes) {}
|
||||
|
||||
void dispose() {}
|
||||
|
||||
override ProcessID adopt(int system_pid)
|
||||
{
|
||||
assert(false, "TODO!");
|
||||
}
|
||||
|
||||
override Process spawn(string[] args, ProcessStdinFile stdin, ProcessStdoutFile stdout, ProcessStderrFile stderr, const string[string] env, ProcessConfig config, string working_dir)
|
||||
{
|
||||
assert(false, "TODO!");
|
||||
}
|
||||
|
||||
override bool hasExited(ProcessID pid)
|
||||
{
|
||||
assert(false, "TODO!");
|
||||
}
|
||||
|
||||
override void kill(ProcessID pid, int signal)
|
||||
{
|
||||
assert(false, "TODO!");
|
||||
}
|
||||
|
||||
override size_t wait(ProcessID pid, ProcessWaitCallback on_process_exit)
|
||||
{
|
||||
assert(false, "TODO!");
|
||||
}
|
||||
|
||||
override void cancelWait(ProcessID pid, size_t waitId)
|
||||
{
|
||||
assert(false, "TODO!");
|
||||
}
|
||||
|
||||
override void addRef(ProcessID pid)
|
||||
{
|
||||
assert(false, "TODO!");
|
||||
}
|
||||
|
||||
override bool releaseRef(ProcessID pid)
|
||||
{
|
||||
assert(false, "TODO!");
|
||||
}
|
||||
|
||||
protected override void* rawUserData(ProcessID descriptor, size_t size, DataInitializer initialize, DataInitializer destroy)
|
||||
@system {
|
||||
assert(false, "TODO!");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue