Skip to contentSkip to conversation

multi-process: handle heartbit messages in remote process

RFC PATCH Superseded [email protected] 1 participant 1 message Mar 7, 2019

v1 of 15 Superseded Latest is v15 →

lore
Share & tools
lore
#0 lore raw

RFC PATCH 32/37 multi-process: handle heartbit messages in remote process

From: Elena Ufimtseva <[email protected]>

and reply back to proxy object.

---
 remote/remote-main.c | 6 ++++++
 1 file changed, 6 insertions(+)
remote/remote-main.c +6 -0
index 3fa6cbd..1e45105 100644
@@ -339,6 +339,7 @@ static void process_msg(GIOCondition cond)
 {
     ProcMsg *msg = NULL;
     Error *err = NULL;
+    int wait;
 
     if ((cond & G_IO_HUP) || (cond & G_IO_ERR)) {
         error_setg(&err, "socket closed, cond is %d", cond);
@@ -418,6 +419,11 @@ static void process_msg(GIOCondition cond)
     case DEVICE_DEL:
         process_device_del_msg(msg);
         break;
+    case PROXY_PING:
+        wait = msg->fds[0];
+        notify_proxy(wait, (uint32_t)getpid());
+        PUT_REMOTE_WAIT(wait);
+        break;
     default:
         error_setg(&err, "Unknown command");
         goto finalize_loop;
Signature · 1 line
1.8.3.1