[systemd-devel] [PATCH] main: fix error message if PR_SET_CHILD_REAPER is not available

Marius Tolzmann tolzmann at molgen.mpg.de
Fri Aug 17 02:15:54 PDT 2012


Hi..

On 08/17/12 02:44, shawn wrote:
> On Thu, 2012-08-16 at 18:38 +0200, Marius Tolzmann wrote: 
>> ---
>> +                if (r < 0 && errno == EINVAL)
>>                          log_error("Perhaps the kernel version is too old (< 3.4?)");
> 
> PR_SET_CHILD_SUBREAPER made it into 3.3, so this should be say (<3.3?)

I actually just changed the error handling logic and did not care much
about the content of error messages.. Because this fixes *my* problem..
8) Thats what I like at open source the most: I fix *my* problems and
(try to) share 8)

But 'git grep PR_SET_CHILD_SUBREAPER' on the 3.3.8 (EOL) branch did not
return any matches for me. So I guess it may be correct to mention <3.4
here. Also a 'git br -a --contains ebec18a6' states linux-3.4.y as the
first branch to contain Lennarts commit.

As mentioned before, it may be reasonable to change those message to
log_warning() since it may still be ok not to reparent all childs to
systemd --user. At least if the error is EINVAL, which seems to be the
only error setting PR_SET_CHILD_SUBREAPER may raise (at the moment).

Or if this is worth a log_error(), changing the requirements section in
the README to reflect that linux kernel >= 3.4 is required (for the
systemd --user usecase) may be a good idea.

As far as I understand this feature, it is not just to have a stylish
process-list but to be able to predictable handle dying child processes.

Best, marius..

-- 
Dipl.-Inf. Marius Tolzmann <marius.tolzmann at molgen.mpg.de>
----------------------------------.------------------------------
MPI f. molekulare Genetik         |
Ihnestrasse 63-73, D-14195 Berlin |   ==> MarIuX GNU/Linux <==
Phone: +49 (0)30 8413 1709        |
----------------------------------^------------------------------
God put me on earth to accomplish a certain number of things.
Right now I am so far behind..
   ..I will never die.         <by calvin from calvin&hobbes ;)>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4572 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20120817/ab63d3b6/attachment.bin>


More information about the systemd-devel mailing list