Changeset 102345 in vbox for trunk/src/libs/xpcom18a4/ipc
- Timestamp:
- Nov 27, 2023 6:48:07 PM (14 months ago)
- Location:
- trunk/src/libs/xpcom18a4/ipc/ipcd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/ipc/ipcd/daemon/src/ipcdUnix.cpp
r102343 r102345 59 59 #include <errno.h> 60 60 61 #include "prprf.h"62 63 61 #include "ipcConfig.h" 64 62 #include "ipcMessage.h" … … 205 203 // 206 204 char buf[32]; 207 int nb = PR_snprintf(buf, sizeof(buf), "%u\n", (unsigned long) getpid()); 208 write(ipcLockFD, buf, nb); 205 ssize_t nb = RTStrPrintf2(buf, sizeof(buf), "%u\n", (unsigned long) getpid()); 206 if (nb <= 0) 207 return ELockFileOpen; 208 write(ipcLockFD, buf, (size_t)nb); 209 209 210 210 return EOk; -
trunk/src/libs/xpcom18a4/ipc/ipcd/shared/src/ipcConfig.h
r3372 r102345 39 39 #define ipcProto_h__ 40 40 41 #if defined(XP_WIN)42 //43 // use WM_COPYDATA messages44 //45 #include "prprf.h"46 47 #define IPC_WINDOW_CLASS "Mozilla:IPCWindowClass"48 #define IPC_WINDOW_NAME "Mozilla:IPCWindow"49 #define IPC_CLIENT_WINDOW_CLASS "Mozilla:IPCAppWindowClass"50 #define IPC_CLIENT_WINDOW_NAME_PREFIX "Mozilla:IPCAppWindow:"51 #define IPC_SYNC_EVENT_NAME "Local\\MozillaIPCSyncEvent"52 #ifndef IPC_DAEMON_APP_NAME53 #define IPC_DAEMON_APP_NAME "mozilla-ipcd.exe"54 #endif55 #define IPC_PATH_SEP_CHAR '\\'56 #define IPC_MODULES_DIR "ipc\\modules"57 58 #define IPC_CLIENT_WINDOW_NAME_MAXLEN (sizeof(IPC_CLIENT_WINDOW_NAME_PREFIX) + 20)59 60 // writes client name into buf. buf must be at least61 // IPC_CLIENT_WINDOW_NAME_MAXLEN bytes in length.62 inline void IPC_GetClientWindowName(PRUint32 pid, char *buf)63 {64 PR_snprintf(buf, IPC_CLIENT_WINDOW_NAME_MAXLEN, "%s%u",65 IPC_CLIENT_WINDOW_NAME_PREFIX, pid);66 }67 68 #else69 41 #include "nscore.h" 70 42 // … … 89 61 NS_HIDDEN_(void) IPC_GetDefaultSocketPath(char *buf, PRUint32 bufLen); 90 62 91 #endif92 93 63 // common shared configuration values 94 64
Note:
See TracChangeset
for help on using the changeset viewer.