GNU bug report logs - #45729
[PATCH] system_process_attributes for OpenBSD

Previous Next

Package: emacs;

Reported by: Omar Polo <op <at> omarpolo.com>

Date: Sat, 9 Jan 2021 01:04:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45729 in the body.
You can then email your comments to 45729 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#45729; Package emacs. (Sat, 09 Jan 2021 01:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Omar Polo <op <at> omarpolo.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 09 Jan 2021 01:04:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Omar Polo <op <at> omarpolo.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] system_process_attributes for OpenBSD
Date: Fri, 08 Jan 2021 19:59:56 +0100
[Message part 1 (text/plain, inline)]
Tags: patch

Hello,

The attached patch implements system_process_attributes for OpenBSD.
With this I am able to use proced \o/

There are five stats that I don't know how to collect (cminflt, cmajflt,
cstime, ctime and thcount).  Everything else seem consistent with
top(1).

I avoided to dynamically allocate the args string and instead reused the
existing storage; this is similar to the freebsd code, but if it seems
ugly I can replace that with a calloc+strlcat like in the previous patch
sent to emacs-devel@.

Note: I don't know how sysctl behaves on other systems, but at least on
OpenBSD it's not possible to get the argv for every process.  In my
environment only for a couple of process the KERN_PROC_ARGV sysctl
fails.  So, it's possible to see some entries with `?' as `args' in
proced, but you can verify that it's "expected" by running "ps $PID" and
see that you get "(executable-name)" under the COMMAND column.  (top(1)
seems to just hide them)

Should the patch include an entry in etc/NEWS?

Thanks,

Omar Polo

In GNU Emacs 28.0.50 (build 4, x86_64-unknown-openbsd6.8, X toolkit, cairo version 1.16.0, Xaw scroll bars)
 of 2021-01-05 built on venera
Repository revision: ce0c9c349363b5dbea56f7e32c838a93c729263d
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12010000
System Description: OpenBSD venera 6.8 GENERIC.MP#223 amd64

Configured using:
 'configure --prefix=/home/op/opt/emacs --with-x-toolkit=lucid'

[system_process_attribute-2.diff (text/patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45729; Package emacs. (Sun, 10 Jan 2021 13:30:02 GMT) Full text and rfc822 format available.

Message #8 received at 45729 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Omar Polo <op <at> omarpolo.com>
Cc: 45729 <at> debbugs.gnu.org
Subject: Re: bug#45729: [PATCH] system_process_attributes for OpenBSD
Date: Sun, 10 Jan 2021 14:28:56 +0100
Omar Polo <op <at> omarpolo.com> writes:

> The attached patch implements system_process_attributes for OpenBSD.
> With this I am able to use proced \o/

Looks good to me, and I've tested it slightly on OpenBSD, and it seems
to work fine, so I've now pushed it to Emacs 28.  (I see that your
copyright is on file...  er...  OK, your entry has a timestamp of
"2021-07-07", so that makes it even better -- it's from the future!)

(Oh, one minor note for future patches -- using "git format-patch" (or
something similar) to format it is usually a good idea, because then
it'll apply automatically.  I had to do a "patch -p0" here.)

> Should the patch include an entry in etc/NEWS?

I've added one.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 10 Jan 2021 13:30:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 45729 <at> debbugs.gnu.org and Omar Polo <op <at> omarpolo.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 10 Jan 2021 13:30:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45729; Package emacs. (Sun, 10 Jan 2021 14:16:01 GMT) Full text and rfc822 format available.

Message #15 received at 45729 <at> debbugs.gnu.org (full text, mbox):

From: Omar Polo <op <at> omarpolo.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 45729 <at> debbugs.gnu.org
Subject: Re: bug#45729: [PATCH] system_process_attributes for OpenBSD
Date: Sun, 10 Jan 2021 15:15:11 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Omar Polo <op <at> omarpolo.com> writes:
>
>> The attached patch implements system_process_attributes for OpenBSD.
>> With this I am able to use proced \o/
>
> Looks good to me, and I've tested it slightly on OpenBSD, and it seems
> to work fine, so I've now pushed it to Emacs 28.  (I see that your
> copyright is on file...  er...  OK, your entry has a timestamp of
> "2021-07-07", so that makes it even better -- it's from the future!)

Sorry, I don't understand this.  Do you mean the date in my copyright
assignment?  On the pdf I have, both my sign and the fsf one are dated
2021-01-07.  I'm missing something?

> (Oh, one minor note for future patches -- using "git format-patch" (or
> something similar) to format it is usually a good idea, because then
> it'll apply automatically.  I had to do a "patch -p0" here.)

Sorry, I was playing with another vcs and I forgot to re-test the patch
before sending.  I'll pay more attention in the future.

>> Should the patch include an entry in etc/NEWS?
>
> I've added one.

Thanks!

Omar Polo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45729; Package emacs. (Sun, 10 Jan 2021 14:38:02 GMT) Full text and rfc822 format available.

Message #18 received at 45729 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Omar Polo <op <at> omarpolo.com>
Cc: 45729 <at> debbugs.gnu.org
Subject: Re: bug#45729: [PATCH] system_process_attributes for OpenBSD
Date: Sun, 10 Jan 2021 15:37:15 +0100
Omar Polo <op <at> omarpolo.com> writes:

>> Looks good to me, and I've tested it slightly on OpenBSD, and it seems
>> to work fine, so I've now pushed it to Emacs 28.  (I see that your
>> copyright is on file...  er...  OK, your entry has a timestamp of
>> "2021-07-07", so that makes it even better -- it's from the future!)
>
> Sorry, I don't understand this.  Do you mean the date in my copyright
> assignment?  On the pdf I have, both my sign and the fsf one are dated
> 2021-01-07.  I'm missing something?

Sorry, just being silly.  It looks like all the entries in the database
on the FSF side from that date is marked as 2021-07-07 instead of
2021-01-07 (just a typo from somebody).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45729; Package emacs. (Sun, 10 Jan 2021 14:44:02 GMT) Full text and rfc822 format available.

Message #21 received at 45729 <at> debbugs.gnu.org (full text, mbox):

From: Omar Polo <op <at> omarpolo.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 45729 <at> debbugs.gnu.org
Subject: Re: bug#45729: [PATCH] system_process_attributes for OpenBSD
Date: Sun, 10 Jan 2021 15:42:59 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Omar Polo <op <at> omarpolo.com> writes:
>
>>> Looks good to me, and I've tested it slightly on OpenBSD, and it seems
>>> to work fine, so I've now pushed it to Emacs 28.  (I see that your
>>> copyright is on file...  er...  OK, your entry has a timestamp of
>>> "2021-07-07", so that makes it even better -- it's from the future!)
>>
>> Sorry, I don't understand this.  Do you mean the date in my copyright
>> assignment?  On the pdf I have, both my sign and the fsf one are dated
>> 2021-01-07.  I'm missing something?
>
> Sorry, just being silly.  It looks like all the entries in the database
> on the FSF side from that date is marked as 2021-07-07 instead of
> 2021-01-07 (just a typo from somebody).

I was worried I've done something wrong, sorry.  (overly so)

Thanks again,

Omar Polo




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 08 Feb 2021 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 49 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.