Skip to content

Commit 918d35c

Browse files
committed
support systems with long PIDs
1 parent dc0c7f3 commit 918d35c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

common/pid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ npid_t PID;
3939
void init_common_PID (void) {
4040
if (!PID.pid) {
4141
int p = getpid ();
42-
assert (!(p & 0xffff0000));
42+
assert (!(p & 0x80000000));
4343
PID.pid = p;
4444
}
4545
if (!PID.utime) {

common/pid.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
struct process_id {
3030
unsigned ip;
3131
short port;
32-
unsigned short pid;
32+
unsigned int pid;
3333
int utime;
3434
};
3535

3636
struct process_id_ext {
3737
unsigned ip;
3838
short port;
39-
unsigned short pid;
39+
unsigned int pid;
4040
int utime;
4141
int actor_id;
4242
};

0 commit comments

Comments
 (0)