emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

list-system-processes on OpenBSD [was Re: emacs-24.2.93 build problems]


From: Glenn Morris
Subject: list-system-processes on OpenBSD [was Re: emacs-24.2.93 build problems]
Date: Tue, 05 Mar 2013 12:24:45 -0500
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Jérémie Courrèges-Anglas wrote:

> But as far as 24.3 is concerned, I *really* suggest making this
> function a stub on OpenBSD (just returning Qnil).

I'm inclined to agree with this. Any other opinions?

Ref
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11797
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5725
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5243

> Here's why:
>
> There are two different APIs involved:
> - old KERN_PROC, similar to NetBSD
> - new KERN_PROC, completely different
>
> Here's how they have evolved:
>
> 1. old KERN_PROC API present and visible (usable)
>    sysctl.h rev 1.1.1.1 (1995/10/18) -> rev 1.67 (2003/12/23)
>
> 2. new KERN_PROC API added as KERN_PROC2, old KERN_PROC still available
>    sysctl.h rev 1.68 (2004/01/07) -> rev 1.100 (2009/06/15)
>
> 3. old KERN_PROC becomes hidden behind #ifdef's
>    sysctl rev 1.101 (2010/01/10) -> rev 1.108 (2011/03/07)
>
> 4. old KERN_PROC is removed, the new KERN_PROC replaces it, KERN_PROC2
>    aliases still present for backward compat
>    sysctl.h rev 1.109 (2011/03/12) -> rev 1.119 (2011/12/14)
>
> 5. KERN_PROC2 aliases removed, only the new API remains
>    sysctl.h rev 1.120 (2012/01/07) -> now
>
>
> I've done some _light_ testing and here are the results:
>
> - with or without the patch adding fallback to KERN_PROC2, build fails
>   for cases 1 and 2. (This is because p_pid field wasn't present in
>   struct kinfo_proc at that time.)
>
> - with the patch, build doesn't fail for case 3
>
> - with the patch, cases 3, 4 and 5 will have list-system-processes
>   returning nil, since sysctl() is called with a wrong mib.
>
> So supporting list-system-processes (as-is) on OpenBSD for 24.3 leads to
> build failing with 1995/10/18 < OpenBSD < 2010/01/10 and to a useless
> (and potentially harmful) function with OpenBSD >= 2010/01/10.
>
> PS: I did not and I will not investigate the case of MirOS.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]