--- linux-2.5/ipc/msg.c-save 2003-05-14 00:36:26.000000000 -0700 +++ linux-2.5/ipc/msg.c 2003-08-28 10:07:51.000000000 -0700 @@ -707,7 +707,7 @@ retry: goto retry; } - msq->q_lspid = current->pid; + msq->q_lspid = current->tgid; msq->q_stime = get_seconds(); if(!pipelined_send(msq,msg)) { @@ -801,7 +801,7 @@ retry: list_del(&msg->m_list); msq->q_qnum--; msq->q_rtime = get_seconds(); - msq->q_lrpid = current->pid; + msq->q_lrpid = current->tgid; msq->q_cbytes -= msg->m_ts; atomic_sub(msg->m_ts,&msg_bytes); atomic_dec(&msg_hdrs); --- linux-2.5/ipc/sem.c-save 2003-08-14 01:27:01.000000000 -0700 +++ linux-2.5/ipc/sem.c 2003-08-28 10:08:09.000000000 -0700 @@ -664,7 +664,7 @@ static int semctl_main(int semid, int se for (un = sma->undo; un; un = un->id_next) un->semadj[semnum] = 0; curr->semval = val; - curr->sempid = current->pid; + curr->sempid = current->tgid; sma->sem_ctime = get_seconds(); /* maybe some queued-up processes were waiting for this */ update_queue(sma); @@ -1052,7 +1052,7 @@ retry_undos: if (error) goto out_unlock_free; - error = try_atomic_semop (sma, sops, nsops, un, current->pid); + error = try_atomic_semop (sma, sops, nsops, un, current->tgid); if (error <= 0) goto update; @@ -1064,7 +1064,7 @@ retry_undos: queue.sops = sops; queue.nsops = nsops; queue.undo = un; - queue.pid = current->pid; + queue.pid = current->tgid; queue.id = semid; if (alter) append_to_queue(sma ,&queue); @@ -1206,7 +1206,7 @@ found: sem->semval += u->semadj[i]; if (sem->semval < 0) sem->semval = 0; /* shouldn't happen */ - sem->sempid = current->pid; + sem->sempid = current->tgid; } } sma->sem_otime = get_seconds(); --- linux-2.5/ipc/shm.c-save 2003-07-11 20:32:12.000000000 -0700 +++ linux-2.5/ipc/shm.c 2003-08-28 10:08:22.000000000 -0700 @@ -89,7 +89,7 @@ static inline void shm_inc (int id) { if(!(shp = shm_lock(id))) BUG(); shp->shm_atim = get_seconds(); - shp->shm_lprid = current->pid; + shp->shm_lprid = current->tgid; shp->shm_nattch++; shm_unlock(shp); } @@ -136,7 +136,7 @@ static void shm_close (struct vm_area_st /* remove from the list of attaches of the shm segment */ if(!(shp = shm_lock(id))) BUG(); - shp->shm_lprid = current->pid; + shp->shm_lprid = current->tgid; shp->shm_dtim = get_seconds(); shp->shm_nattch--; if(shp->shm_nattch == 0 && @@ -209,7 +209,7 @@ static int newseg (key_t key, int shmflg if(id == -1) goto no_id; - shp->shm_cprid = current->pid; + shp->shm_cprid = current->tgid; shp->shm_lprid = 0; shp->shm_atim = shp->shm_dtim = 0; shp->shm_ctim = get_seconds();