Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162316229
D43077.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
799 B
Referenced Files
None
Subscribers
None
D43077.diff
View Options
diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c
--- a/sys/kern/kern_mib.c
+++ b/sys/kern/kern_mib.c
@@ -754,6 +754,10 @@
CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE,
0, 0, sysctl_kern_pid_max, "I", "Maximum allowed pid");
+SYSCTL_INT(_kern, OID_AUTO, pid_max_limit, CTLFLAG_RD,
+ SYSCTL_NULL_INT_PTR, PID_MAX,
+ "Maximum allowed pid (kern.pid_max) top limit");
+
#include <sys/bio.h>
#include <sys/buf.h>
SYSCTL_INT(_debug_sizeof, OID_AUTO, bio, CTLFLAG_RD,
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -955,7 +955,7 @@
* in a pid_t, as it is used to represent "no process group".
*/
#define PID_MAX 99999
-#define NO_PID 100000
+#define NO_PID (PID_MAX + 1)
#define THREAD0_TID NO_PID
extern pid_t pid_max;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jul 13, 12:14 AM (13 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35016630
Default Alt Text
D43077.diff (799 B)
Attached To
Mode
D43077: Don't hardcode maximum PID.
Attached
Detach File
Event Timeline
Log In to Comment