1 // merica terminal all in one
4 #include "signal_exit.h"
6 int main(int argc, char **argv)
8 struct ev_loop *loop = EV_DEFAULT;
9 int pipefd[2]; // read <- write
13 if (pipe(pipefd) == -1) {
18 set_signal_exit(loop);
20 if (mt_rfid_init(&rfid, loop, pipefd[1]) != 0) {
24 if (mt_server_init(&server, loop, pipefd[0]) != 0) {
30 mt_server_deinit(&server);
31 mt_rfid_deinit(&rfid);