VirtualBox

Changeset 103489 in vbox


Ignore:
Timestamp:
Feb 21, 2024 11:03:57 AM (9 months ago)
Author:
vboxsync
Message:

libs/xpcom: VBoxSVC and the IPC daemon spawning code need to agree on what is the magic going through the startup pipe, bugref:10594

Location:
trunk/src/libs/xpcom18a4/ipc/ipcd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/ipc/ipcd/client/src/ipcdclient.cpp

    r103472 r103489  
    13931393          hPipeWr = NIL_RTPIPE;
    13941394
    1395           uint8_t ch;
    1396           vrc = RTPipeReadBlocking(hPipeRd, &ch, sizeof(ch), NULL /*pcbRead*/);
     1395          size_t cbRead = 0;
     1396          char msg[10];
     1397          memset(msg, '\0', sizeof(msg));
     1398          vrc = RTPipeReadBlocking(hPipeRd, &msg[0], sizeof(msg) - 1, &cbRead);
    13971399          if (   RT_SUCCESS(vrc)
    1398               && ch == IPC_STARTUP_PIPE_MAGIC)
     1400              && cbRead == 5
     1401              && !strcmp(msg, "READY"))
    13991402          {
    14001403            RTPipeClose(hPipeRd);
  • trunk/src/libs/xpcom18a4/ipc/ipcd/shared/src/ipcConfig.h

    r102345 r103489  
    6161NS_HIDDEN_(void) IPC_GetDefaultSocketPath(char *buf, PRUint32 bufLen);
    6262
    63 // common shared configuration values
    64 
    65 #define IPC_STARTUP_PIPE_NAME   "ipc:startup-pipe"
    66 #define IPC_STARTUP_PIPE_MAGIC  0x1C
    67 
    6863#endif // !ipcProto_h__
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette