bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#36287: 26.2.90; On macOS, process-attributes returns truncated comma


From: Lars Ingebrigtsen
Subject: bug#36287: 26.2.90; On macOS, process-attributes returns truncated command name
Date: Tue, 18 Aug 2020 20:30:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Robert Pluim <rpluim@gmail.com> writes:

> The sysctl interface will never return more than 16 characters. A
> quick google leads me to the following (there may well be utility
> functions in emacs for the full-path => command name munging already).
>

[...]

>  #ifdef __FreeBSD__
>  /* Sparc/ARM machine/frame.h has 'struct frame' which conflicts with Emacs's
>     'struct frame', so rename it.  */
> @@ -3819,8 +3823,21 @@ system_process_attributes (Lisp_Object pid)

[...]

> +  char pathbuf[PROC_PIDPATHINFO_MAXSIZE];
> +  char *comm;
> +
> +  if (proc_pidpath (proc_id, pathbuf, sizeof(pathbuf)) > 0)
> +    {

I've tested this on Catalina now, and it fixes the problem, so I'll just
go ahead and apply it to Emacs 28.

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





reply via email to

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