using namespace libt2n;
-int main(int argc, char** argv) {
- socket_server ss("./socket");
- socket_server ss_other("./socket_other");
- group_command_server<cmd_group_default> cs(ss);
- group_command_server<cmd_group_other> cs_other(ss_other);
-
- // handle requests
- while(true) {
- cs.handle(1000);
- cs_other.handle(1000);
- }
-
- return 0;
+int main(int argc, char** argv)
+{
+ // don't kill the server on broken pipe
+ signal(SIGPIPE, SIG_IGN);
+
+ socket_server ss("./socket");
+ socket_server ss_other("./socket_other");
+ group_command_server<cmd_group_default> cs(ss);
+ group_command_server<cmd_group_other> cs_other(ss_other);
+
+ // handle requests
+ while(true)
+ {
+ cs.handle(1000);
+ cs_other.handle(1000);
+ }
+
+ return 0;
}