[PATCH] fix getpgrp handling
Mike Frysinger
vapier at gentoo.org
Fri Apr 27 02:48:33 UTC 2012
On Thursday 26 April 2012 10:14:01 Mark Salter wrote:
> The test for generating generating a stub for getpgrp was wrong
generating to the max!
> and would result in duplicate symbols when building without
> __NR_getpgrp, but with __NR_getpgid and __NR_getpid. A closer
> look at the getpgrp implementation using getpgid showed that
> getpid was being called to pass the current pid to getpgid.
> This isn't necessary because passing 0 to getpgid returns the
> pgid of the current process. This patch cleans up the getpgrp
> implementation and the stub test.
very cool
> --- a/libc/sysdeps/linux/common/stubs.c
> +++ b/libc/sysdeps/linux/common/stubs.c
> @@ -150,7 +150,7 @@ make_stub(get_kernel_syms)
> make_stub(getpeername)
> #endif
>
> -#if !defined(__NR_getpgrp) && (defined(__NR_getpgid) &&
> (defined(__NR_getpid) || defined(__NR_getxpid)))
> +#if !defined __NR_getpgrp && ! defined __NR_getpgid
whitespace is slightly off, but i just fixed that, as well as the changelog and
merged it
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20120426/cd953926/attachment-0001.asc>
More information about the uClibc
mailing list