Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] where is PID_MAX_DEFAULT ?
Date: Thu, 04 Jan 2007 15:53:28
Message-Id: 7573e9640701040748m49d26627oee0fb36ff9a23266@mail.gmail.com
In Reply to: [gentoo-user] [OT] where is PID_MAX_DEFAULT ? by Iain Buchanan
1 On 1/3/07, Iain Buchanan <iaindb@××××××××××××.au> wrote:
2 > Hi all,
3 >
4 > I was just trying to compile one of my programs that includes
5 > linux/threads.h for the #define PID_MAX_DEFAULT, however, threads.h
6 > isn't there anymore!
7
8 Hmm, on linux the maximum PID can be changed dynamically at run time.
9 Wouldn't it be better to change this to read /proc/sys/kernel/pid_max?
10
11 > I've just upgraded linux-headers to 2.6.19 - is this the problem?
12
13 It seems so. From kernel-2.eclass:
14
15 # 2.6.18 introduces headers_install which means we dont need any
16 # of this crap anymore :D
17 if kernel_is ge 2 6 18 ; then
18 env_setup_xmakeopts
19 emake headers_install
20 INSTALL_HDR_PATH="${D}"/${ddir}/.. ${xmakeopts} || die
21
22 In other words, for versions previous to 2.6.18, (almost) all headers
23 in the tarball were installed. For 2.6.18 and later, the makefile in
24 the tarball defines what gets installed.
25
26 If you truly need this header, make a private copy for your source
27 directory, or just define PID_MAX_DEFAULT yourself. But as I
28 mentioned above, it can be changed at run-time, so relying on this to
29 be constant could be dangerous.
30
31 -Richard
32 --
33 gentoo-user@g.o mailing list