Skip to content

Commit 16839e7

Browse files
rootcursoragent
andcommitted
fix: support pid > 65535 (remove assert, use lower 16 bits)
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent cafc338 commit 16839e7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

common/pid.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ npid_t PID;
3939
void init_common_PID (void) {
4040
if (!PID.pid) {
4141
int p = getpid ();
42-
assert (!(p & 0xffff0000));
43-
PID.pid = p;
42+
PID.pid = (unsigned short) (p & 0xffff);
4443
}
4544
if (!PID.utime) {
4645
PID.utime = time (0);

0 commit comments

Comments
 (0)