X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=sens.c;h=5be4cc033d931cc569f475fccf0a37b8f303395e;hb=c6f0e4e4838f493a7e0d97b48743a6b60abc9e2e;hp=efb5811090e26dcf5f72bd63aa6b3fcccd9328cd;hpb=48e21a62bb11d3640d278b50ad238d9595a07315;p=android-x86%2Fhardware-intel-libsensors.git diff --git a/sens.c b/sens.c index efb5811..5be4cc0 100644 --- a/sens.c +++ b/sens.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -176,8 +177,16 @@ static void run_sensors_poll_v0(void) } } +static void sig_pipe(int sig) +{ + client = NULL; +} + static void *run_sensors_thread(void *arg __attribute((unused))) { + + signal(SIGPIPE, sig_pipe); + switch (dev->version) { case SENSORS_DEVICE_API_VERSION_0_1: default: @@ -408,7 +417,6 @@ static int start_server(void) fclose(f); } - close(conn); } }