Add sem_wait timeout on the kconsumerd thread
authorDavid Goulet <david.goulet@polymtl.ca>
Tue, 4 Oct 2011 21:15:32 +0000 (17:15 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Tue, 4 Oct 2011 21:15:32 +0000 (17:15 -0400)
commitee0b00610a6b7beaf6af8feddd7ef6751f22debf
treec42de91b283771d2c3c315a5bcdf51cff95e3c92
parent74babd95d68f4d871d66f3988b84e04c963d0162
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 <david.goulet@polymtl.ca>
include/lttng-share.h
ltt-sessiond/main.c
This page took 0.028005 seconds and 5 git commands to generate.