From: David Goulet Date: Tue, 4 Oct 2011 21:15:32 +0000 (-0400) Subject: Add sem_wait timeout on the kconsumerd thread X-Git-Tag: v2.0-pre15~196 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=ee0b00610a6b7beaf6af8feddd7ef6751f22debf;hp=ee0b00610a6b7beaf6af8feddd7ef6751f22debf Add sem_wait timeout on the kconsumerd thread It's unlikely to happen but is the kconsumerd was not able to send us the sock ready command, at least the session daemon will not stall forever. A 30 seconds timeout is added and error is handle after that. Also adds the handling of the sem_init ret value and adds mutex lock around the kconsumerd pid in the same function. There was also a problem on error code handling where LTTCOMM error was returned by spawn kconsumerd function but handled as if it might be negative at the end of the call chain. This was preventing to return the right error code to the client when the kconsumerd failed. Signed-off-by: David Goulet ---