rendered paste body#include "include/pi-low.h"
PiLow *pl ;
void handler(int num)
{
printf("Ctrl+C pressed bailing out\n");
delete_core_socket(pl->core_socket);
exit(0);
}
int main(int argv, char **argc)
{
if(argv < 2 )
{
g_error("You have to supply the iface");
}
g_debug("Before new_pilow");
pl = new_pi_low(argc[1], PI_OVER_ETH);
g_debug("After");
pi_low_init(pl);
g_debug("Letting the deamon sleeping");
signal(SIGTERM, handler);
signal(SIGSTOP, handler);
signal(SIGINT, handler);
while(1) sleep(1);
return 0;
}