Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 675242 - x11-misc/xautolock: Unconditionally use waitpid() instead of wait3()
Summary: x11-misc/xautolock: Unconditionally use waitpid() instead of wait3()
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Desktop Misc. Team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-01-11 22:56 UTC by Mira Ressel
Modified: 2020-04-11 06:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
x11-misc/xautolock: Unconditionally use waitpid() instead of wait3() (xautolock-2.2-waitpid.patch,1.12 KB, patch)
2019-01-11 22:56 UTC, Mira Ressel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mira Ressel 2019-01-11 22:56:47 UTC
Created attachment 560710 [details, diff]
x11-misc/xautolock: Unconditionally use waitpid() instead of wait3()

Currently, the xautolock ebuild applies a patch to use waitpid() instead of the long obsolete wait3(), but only on glibc systems. This breaks the build on musl systems, since musl doesn't have wait3() either.

Since all systems supported by Gentoo have waitpid(), we can just use it unconditionally. A patch is attached; it replaces the current debian/patches/14-do-not-use-union-wait-type.patch.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2019-01-12 11:12:55 UTC
I am not sure I like "unconditionally". Couldn't you instead extend debian/patches/14-do-not-use-union-wait-type.patch to cover the musl case instead?
Comment 2 Mira Ressel 2019-01-15 00:21:13 UTC
(In reply to Jeroen Roovers from comment #1)
> I am not sure I like "unconditionally". Couldn't you instead extend
> debian/patches/14-do-not-use-union-wait-type.patch to cover the musl case
> instead?

No. There's (intentionally) no way to detect musl at build time. If anything, the correct way to do this would be to tweak the build system so it checks whether waitpid() is available, but since all contemporary implementations have it (wait3() was already deprecated in SUSv2, back in '97), that's really not worth the hassle.
Comment 3 Larry the Git Cow gentoo-dev 2019-01-15 10:35:02 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=075f311d7e8913f0a27f2247faac675ebb94d137

commit 075f311d7e8913f0a27f2247faac675ebb94d137
Author:     Jeroen Roovers <jer@gentoo.org>
AuthorDate: 2019-01-15 10:34:18 +0000
Commit:     Jeroen Roovers <jer@gentoo.org>
CommitDate: 2019-01-15 10:34:57 +0000

    x11-misc/xautolock: Use waitpid() instead of wait3()
    
    Fixes: https://bugs.gentoo.org/675242
    Package-Manager: Portage-2.3.55, Repoman-2.3.12
    Signed-off-by: Jeroen Roovers <jer@gentoo.org>

 .../files/xautolock-2.2_p5_p1-waitpid.patch        | 25 ++++++++++
 x11-misc/xautolock/metadata.xml                    | 11 +++++
 x11-misc/xautolock/xautolock-2.2_p5_p1-r1.ebuild   | 54 ++++++++++++++++++++++
 3 files changed, 90 insertions(+)