X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=libust%2Ftracectl.c;h=5d06f28264a18d4c69b991afbfd25f32700c4a90;hb=753e1b51796c2233b6ddecdf751400f9b2cddc9f;hp=25e96450ca70492ad1edfb1a644a759f47f35252;hpb=b102c2b0b07a155285716d9f7fd788662cecd54b;p=ust.git diff --git a/libust/tracectl.c b/libust/tracectl.c index 25e9645..5d06f28 100644 --- a/libust/tracectl.c +++ b/libust/tracectl.c @@ -17,6 +17,7 @@ #define _GNU_SOURCE #include +#include #include #include #include @@ -231,9 +232,13 @@ void process_blocked_consumers(void) continue; } if(result == 0) { + int res; DBG("PRODUCER END"); - close(bc->fd_producer); + res = close(bc->fd_producer); + if(res == -1) { + PERROR("close"); + } list_del(&bc->list); @@ -649,7 +654,7 @@ static int do_cmd_get_subbuffer(const char *recvbuf, struct ustcomm_source *src) if(trace == NULL) { int result; - WARN("Cannot find trace. It was likely destroyed by the user."); + DBG("Cannot find trace. It was likely destroyed by the user."); result = ustcomm_send_reply(&ustcomm_app.server, "NOTFOUND", src); if(result) { ERR("ustcomm_send_reply failed"); @@ -756,7 +761,7 @@ static int do_cmd_put_subbuffer(const char *recvbuf, struct ustcomm_source *src) trace = _ltt_trace_find(trace_name); if(trace == NULL) { - WARN("Cannot find trace. It was likely destroyed by the user."); + DBG("Cannot find trace. It was likely destroyed by the user."); result = ustcomm_send_reply(&ustcomm_app.server, "NOTFOUND", src); if(result) { ERR("ustcomm_send_reply failed"); @@ -1410,7 +1415,7 @@ static void __attribute__((destructor)) keepalive() destroy_traces(); - ustcomm_fini_app(&ustcomm_app); + ustcomm_fini_app(&ustcomm_app, 0); } void ust_potential_exec(void) @@ -1458,7 +1463,8 @@ static void ust_fork(void) list_del(&bc->list); } - ustcomm_free_app(&ustcomm_app); + /* free app, keeping socket file */ + ustcomm_fini_app(&ustcomm_app, 1); buffers_to_export = 0; have_listener = 0;