Merge pull request #1073 from tobiasblass/fix_recvmsg_endless_loop
FIX: Suprocess loops endlessly when the control socket closes.
This commit is contained in:
commit
df876a7cf8
|
@ -130,7 +130,7 @@ static void communicate(int sock) {
|
|||
int drm_fd = -1;
|
||||
bool running = true;
|
||||
|
||||
while (running && recv_msg(sock, &drm_fd, &msg, sizeof(msg)) >= 0) {
|
||||
while (running && recv_msg(sock, &drm_fd, &msg, sizeof(msg)) > 0) {
|
||||
switch (msg.type) {
|
||||
case MSG_OPEN:
|
||||
errno = 0;
|
||||
|
|
Loading…
Reference in New Issue