Hi..

On 21.08.2012 16:49, Lennart Poettering wrote:
On Thu, 16.08.12 18:38, Marius Tolzmann ([email protected]) wrote:
                  if (r < 0)
-                        log_error("Failed to prctl(PR_SET_CHILD_SUBREAPER): 
%s", strerror(-r));
-                if (r == -EINVAL)
+                        log_error("Failed to prctl(PR_SET_CHILD_SUBREAPER): 
%m");
+                if (r < 0 && errno == EINVAL)
                          log_error("Perhaps the kernel version is too old (< 
3.4?)");
          }

Actually, the error code is returned in errno, not in the retval. I now
commited a fix that corrects this properly.

Yeah.. that is what i actually changed: check errno and not the retval.. i just rechecked r<0 to be sure errno==EINVAL wasn't cached from some previous system call.. (I did not change indentation so that the patch just touches 2 lines and not more..)

But your version is also fine for me, as it fixes the bug, too 8)

Actually you changed the error message to <3.3. As mentioned earlier, I can't find PR_SET_CHILD_SUBREAPER in the linux kernel 3.3.8 code. (by using git grep..) So where is my mistake? That is why I still believe <3.4 was correct..

Best, Marius..

_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to