Skip to contentSkip to conversation

Include tgid when finding next_safe in get_pid()

PATCH New Paul Larson 1 participant 1 message Aug 15, 2002

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Include tgid when finding next_safe in get_pid()

This was broken out from the original get_pid() patch, but it is aplicable even if the other isn't taken. Please apply.

Thanks,
Paul Larson

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.519 -> 1.520
# kernel/fork.c 1.61 -> 1.62
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/08/15 [email protected] 1.520
# Include tgid when finding next_safe in get_pid()
# --------------------------------------------
#

kernel/fork.c +2 -0
diff -Nru a/kernel/fork.c b/kernel/fork.c
@@ -186,6 +186,8 @@
 				next_safe = p->pid;
 			if(p->pgrp > last_pid && next_safe > p->pgrp)
 				next_safe = p->pgrp;
+			if(p->tgid > last_pid && next_safe > p->tgid)
+				next_safe = p->tgid;
 			if(p->session > last_pid && next_safe > p->session)
 				next_safe = p->session;
 		}