--- Smersh/Daemon.cpp 2004/06/18 08:38:55 165 +++ Smersh/Daemon.cpp 2004/06/21 05:47:13 172 @@ -6,12 +6,29 @@ #include "Daemon.hpp" -Daemon::Daemon(int port) : port(port) +void Daemon::serve(bool fork, Daemon* self) { - // + Person::configure(); + + if (fork) + { + switch (::fork()) + { + case -1: + cerr << program << ": fork()\n"; + + exit(1); + case 0: + break; + default: + return; + } + } + + self->handle(); } -Daemon::~Daemon() +void Daemon::handle() { - // + cerr << "Here!\n"; }