From 918d35c95efea4b0866bd33fd1a5ded5aec69797 Mon Sep 17 00:00:00 2001 From: Eugene Krokhalev Date: Wed, 12 Oct 2022 19:54:42 +0000 Subject: [PATCH] support systems with long PIDs --- common/pid.c | 2 +- common/pid.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/pid.c b/common/pid.c index 7bd4b8db..c1ec4c22 100644 --- a/common/pid.c +++ b/common/pid.c @@ -39,7 +39,7 @@ npid_t PID; void init_common_PID (void) { if (!PID.pid) { int p = getpid (); - assert (!(p & 0xffff0000)); + assert (!(p & 0x80000000)); PID.pid = p; } if (!PID.utime) { diff --git a/common/pid.h b/common/pid.h index 82f0c4c8..b2a1f3ba 100644 --- a/common/pid.h +++ b/common/pid.h @@ -29,14 +29,14 @@ struct process_id { unsigned ip; short port; - unsigned short pid; + unsigned int pid; int utime; }; struct process_id_ext { unsigned ip; short port; - unsigned short pid; + unsigned int pid; int utime; int actor_id; };