pipe: Do not wait for pipe_fd indefinitely 73/176473/3
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 19 Apr 2018 11:12:21 +0000 (13:12 +0200)
committerMichal Bloch <m.bloch@samsung.com>
Thu, 19 Apr 2018 12:48:33 +0000 (14:48 +0200)
commitfcfd2be13cb2ffa01b4741f6178f2ccff0a20dff
tree743f49107c5db470578425092031d5dad8ed94a1
parent26840c7fac10852713515a185c15fcbba86af574
pipe: Do not wait for pipe_fd indefinitely

In the case of dlog_logger crash dlog clients
will try to reconnect to server and receive pipe_fd
for logging again.  However, if dlog_logger is being
dumped (in Tizen - by crash-worker), clients will be
able to connect to the socket and request the new
pipe_fd, but recv() for fd will make client block
forever.

This commit works around this problem by introducing
finite timeout for which recv can wait.

Change-Id: Iddbbe668a084a2d0f4fcb2c34b80737d8c4c7eb6
include/logcommon.h
src/libdlog/log_pipe.c
src/logutil/fdi_pipe.c
src/shared/logcommon.c