GNU bug report logs - #73101
Regarding a bug in suspend-emacs

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Riza Dindir <riza.dindir@HIDDEN>; merged with #73100; dated Sat, 7 Sep 2024 14:44:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 73101 <at> debbugs.gnu.org:


Received: (at 73101) by debbugs.gnu.org; 7 Sep 2024 18:21:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 07 14:21:55 2024
Received: from localhost ([127.0.0.1]:57594 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sn04J-0004FQ-GT
	for submit <at> debbugs.gnu.org; Sat, 07 Sep 2024 14:21:55 -0400
Received: from mail-oa1-f50.google.com ([209.85.160.50]:56726)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <riza.dindir@HIDDEN>) id 1smxbe-0003kQ-8f
 for 73101 <at> debbugs.gnu.org; Sat, 07 Sep 2024 11:44:10 -0400
Received: by mail-oa1-f50.google.com with SMTP id
 586e51a60fabf-2781cb2800eso1761414fac.1
 for <73101 <at> debbugs.gnu.org>; Sat, 07 Sep 2024 08:44:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1725723783; x=1726328583; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=v7cNYmTMuWOGLVrdpzghD2cvs9rTMz95Wa7mlLiHCtE=;
 b=TQ7n1jJPtL6tY6nn3+n/jKkF+VzcCAUMKi8I5dZANSTZ2wIfAl4qbvhdsCcaarVClK
 0MOaQ5vfUPH9toms1gSh+U8XSFhb8iEg41HbxcrZBf0Mso8sP9g7n4vqhSVVmKN2mesx
 wxrsNo87/oudoTM5tdzHRVV/X00tLayYUimfVtd5PIM2Iq/P1tBOPaTfSWPAKxkV59zX
 PUOqhJ0ITSa5DvTadrkCfnmO9U7re4mRoaZ+hxwZLlIbd8cpP6qnlNVBrBgBd6xTFhkz
 ZXTKQTlhBQVRklLJilozMr5Gi8tYs7xUmtLsmAv4njYHAOtHPZEYrC+UYEf0SQ5qTcOy
 FCuA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1725723783; x=1726328583;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=v7cNYmTMuWOGLVrdpzghD2cvs9rTMz95Wa7mlLiHCtE=;
 b=o/tVU9FM/IVmpuenLJNJQHLee00Rl8nWqvTFiHmTJkORho3w+MdK+sRixy0zMaoyF2
 tBph5JaCpWObY72Do4iFLlwlb6DZwJMGvu+ntFjhgQqnULn0fK6V+U05EJbkNoX9phdc
 wV9798PQE0DeCpf6uqRE/f/irpzdiobrchfHR90vhqRIwmJMG3zC67nX+fgkQl8PfDGl
 C/BLrPQMCuhCakUzIaSDJqjAPKKc7+UucwfjD4KsTZApOSxwd6FbueCC2db3P6YEirSg
 aPJbL3lRwWz/dstqNk9DGWFNOx+hxNchJPZJz0UPcK3AbxNKVyJrBf4Y1AXek8pyoSyX
 Bklw==
X-Gm-Message-State: AOJu0YwIFmdOHDFMZgSGqBbGzuNLYqL1innlWyWyQnQ7CT3wrlNKMpCS
 uFtyplDE+7mDp6Zz05ydAoa6Mni0elnxtNirYgLawewP/LhSzOsKAXm7Z6zJLe1DvaK3IEeRDuG
 Z5XQIvK/ueAA9eFX8jAAks8TbWZE=
X-Google-Smtp-Source: AGHT+IGcw/FfiTtRQgRU8mLpA2XSMSz617Zo7THcYJgfA/OK3jtse6g4QrpSJzyTP+IKJEfha6pGrVR+9uAhBkZQgu8=
X-Received: by 2002:a05:6870:304f:b0:277:d13a:164 with SMTP id
 586e51a60fabf-27b8301f71emr5872106fac.39.1725723783499; Sat, 07 Sep 2024
 08:43:03 -0700 (PDT)
MIME-Version: 1.0
References: <CA+ek4BGsa1=5RGx_WipJSA-e4LhJfZGMrcHO2kCrURRN6=492g@HIDDEN>
 <865xr7xzds.fsf@HIDDEN>
In-Reply-To: <865xr7xzds.fsf@HIDDEN>
From: Riza Dindir <riza.dindir@HIDDEN>
Date: Sat, 7 Sep 2024 18:42:50 +0300
Message-ID: <CA+ek4BEYK-3ezJ+X+BhrpSBpvCvbR7OwVk+aGZo6egfZkY3BPw@HIDDEN>
Subject: Re: bug#73101: Regarding a bug in suspend-emacs
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000189a30062189615b"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 73101
X-Mailman-Approved-At: Sat, 07 Sep 2024 14:21:52 -0400
Cc: 73101 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000189a30062189615b
Content-Type: text/plain; charset="UTF-8"

I apologize for the duplicate.

On Sat, Sep 7, 2024, 18:22 Eli Zaretskii <eliz@HIDDEN> wrote:

> merge 73101 73100
> thanks
>
> > From: Riza Dindir <riza.dindir@HIDDEN>
> > Date: Sat, 7 Sep 2024 16:34:45 +0300
> >
> > Note: Sending this a second time, I forgot to confirm my request to
> register to the bug-gnu-emacs list.
>
> That was a mistake, because by doing that you have created an
> identical copy of the first bug report.
>
> I'm now merging them.
>

--000000000000189a30062189615b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">I apologize for the duplicate.</div><br><div class=3D"gma=
il_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, Sep 7, 2024, 18:22 =
Eli Zaretskii &lt;<a href=3D"mailto:eliz@HIDDEN">eliz@HIDDEN</a>&gt; wrot=
e:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo=
rder-left:1px #ccc solid;padding-left:1ex">merge 73101 73100<br>
thanks<br>
<br>
&gt; From: Riza Dindir &lt;<a href=3D"mailto:riza.dindir@HIDDEN" target=
=3D"_blank" rel=3D"noreferrer">riza.dindir@HIDDEN</a>&gt;<br>
&gt; Date: Sat, 7 Sep 2024 16:34:45 +0300<br>
&gt; <br>
&gt; Note: Sending this a second time, I forgot to confirm my request to re=
gister to the bug-gnu-emacs list.<br>
<br>
That was a mistake, because by doing that you have created an<br>
identical copy of the first bug report.<br>
<br>
I&#39;m now merging them.<br>
</blockquote></div>

--000000000000189a30062189615b--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73101; Package emacs. Full text available.
Merged 73100 73101. Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 73101 <at> debbugs.gnu.org:


Received: (at 73101) by debbugs.gnu.org; 7 Sep 2024 15:23:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 07 11:23:00 2024
Received: from localhost ([127.0.0.1]:57229 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1smxHA-0002eY-2P
	for submit <at> debbugs.gnu.org; Sat, 07 Sep 2024 11:23:00 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53290)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>)
 id 1smxH8-0002eG-7y; Sat, 07 Sep 2024 11:22:58 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1smxH2-0007ie-0w; Sat, 07 Sep 2024 11:22:52 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=2OxxWmRtwi4ZIbum5EA8fSVbXgqLDg0gJWH+vSAlWRg=; b=jowIaoGgeY6c
 9bXiDyhaq5p6Prkf3TcUU8IokCm2R+UVWXRmzhnt2AzwJ0uis4O58Zs41X/PKA1Liey0pg34BspH0
 X2ZX4yhgAAIcSH2reTVw0zXwj8BOpidwsXJWplfgd3acSUtA65svkjen5C0//Safe7Ph569bRr5bF
 aEIT13rTk0MvxL4xhBOlEgHOpR/hUqzltEjE4TO3wMM7eJkUwIF9/yPDb4JhlOC2U8pbKsdmcMb5r
 cW9TP4XrMO6TNQC0FZB/JRVUQdSIc/DyIsOKKUHU21s08iO7XjCr8zZbplku10esXTVXx32271rCe
 M2jF/YsNKhU4D7rHv/OJlA==;
Date: Sat, 07 Sep 2024 18:22:07 +0300
Message-Id: <865xr7xzds.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Riza Dindir <riza.dindir@HIDDEN>
In-Reply-To: <CA+ek4BGsa1=5RGx_WipJSA-e4LhJfZGMrcHO2kCrURRN6=492g@HIDDEN>
 (message from Riza Dindir on Sat, 7 Sep 2024 16:34:45 +0300)
Subject: Re: bug#73101: Regarding a bug in suspend-emacs
References: <CA+ek4BGsa1=5RGx_WipJSA-e4LhJfZGMrcHO2kCrURRN6=492g@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 73101
Cc: 73101 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

merge 73101 73100
thanks

> From: Riza Dindir <riza.dindir@HIDDEN>
> Date: Sat, 7 Sep 2024 16:34:45 +0300
> 
> Note: Sending this a second time, I forgot to confirm my request to register to the bug-gnu-emacs list.

That was a mistake, because by doing that you have created an
identical copy of the first bug report.

I'm now merging them.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#73101; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 7 Sep 2024 14:43:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 07 10:43:40 2024
Received: from localhost ([127.0.0.1]:57171 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1smwf5-0000T6-2N
	for submit <at> debbugs.gnu.org; Sat, 07 Sep 2024 10:43:39 -0400
Received: from lists.gnu.org ([209.51.188.17]:56486)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <riza.dindir@HIDDEN>) id 1smvb4-0004h0-S5
 for submit <at> debbugs.gnu.org; Sat, 07 Sep 2024 09:35:28 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <riza.dindir@HIDDEN>)
 id 1smvb3-0006cE-NB
 for bug-gnu-emacs@HIDDEN; Sat, 07 Sep 2024 09:35:25 -0400
Received: from mail-oa1-x33.google.com ([2001:4860:4864:20::33])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <riza.dindir@HIDDEN>)
 id 1smvb1-0004cf-Jy
 for bug-gnu-emacs@HIDDEN; Sat, 07 Sep 2024 09:35:25 -0400
Received: by mail-oa1-x33.google.com with SMTP id
 586e51a60fabf-277dd69d6d6so2244648fac.0
 for <bug-gnu-emacs@HIDDEN>; Sat, 07 Sep 2024 06:35:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1725716122; x=1726320922; darn=gnu.org;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=qehAw3Op1dBR1EFeSlFrWXdkOdRRIOAqC43YQx5MmMg=;
 b=bEib3jvFyyhuUAcus79uN8n+1gjwJENbng0RX76RFqCMfJnRXX53rKEXj+Mja76iav
 vBOmj722+Rccz7I8QVssnocGTgJjmReGJeBgnehVzmPKxl2PDvAFM/D27h276bAbwsh7
 3I/2778PMOLCTQVnv1SyRnMwgpQFB8+tTxdPjJrcQ1SHD+IltvoTP3emW7CQQ7qbHciQ
 h1dmbMR042DxxoQT7NtSsTWmKb3USV01B5JI+y6yctk8mEfQUkFwrSnPssDFJOOW4iW7
 mcG6lzBwmOSaKQwehalpDuQMsB83C3T+jUHVh4rUxBesbK2wY9gvEywKdaowFuzH23zq
 GKhA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1725716122; x=1726320922;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=qehAw3Op1dBR1EFeSlFrWXdkOdRRIOAqC43YQx5MmMg=;
 b=WFevAJqYUMsAryWKhyIv97V6HeI3CUtLd5zw8mdxJ8kklEdkeqtRPJNR765kNqbEc5
 xbeQ0Cke9lEz8ITenrKfr7OzdjRmB2ZslaT5dqNTRe+Q2OEKkxcAWRTO27GONTkS08QZ
 ZSiVxciCdunFhGeEz8RAJXp5vqJMBjsQEOIV0Y58zI8ZWwScX1JPJjk8JT36InopzrtH
 yASseJQj6r9s851WmcbnbldISx3XHR+zAivPm0myBXMXGH0znKY1l+g1Xs99UqtVboaJ
 k0tvKk1562nrjOgdzK0sXkimQHxSgfwoDQfv0u5N4fYcupscyC2DHZ7RCiViIUFnyyGQ
 iBIg==
X-Gm-Message-State: AOJu0Yy3cTdYUcz47rapjrTghbTx5UWC2dF0ZSS73HZFDwpo3SX8nMFx
 TJll6aLJ5KUcy5BCsYFXFc8Wg9ry5KGRoIOMnaE4zCQEe0L0bIKPQQPZWdHwuMJUAXGAFNNfMKv
 WeffbkFWUkmZ/jEg8oL9Lp28dh9K7+f8m3nA=
X-Google-Smtp-Source: AGHT+IHkSOTpvTnJfuMWwQb3IDVx0EQJi7F9kwvlrudJQg11tRImckVE7kwqWivAxB8FTNDMYnhaNY4oYcwLGH03yPw=
X-Received: by 2002:a05:6870:65aa:b0:278:29f7:3225 with SMTP id
 586e51a60fabf-27b824d378emr2571372fac.12.1725716121623; Sat, 07 Sep 2024
 06:35:21 -0700 (PDT)
MIME-Version: 1.0
From: Riza Dindir <riza.dindir@HIDDEN>
Date: Sat, 7 Sep 2024 16:34:45 +0300
Message-ID: <CA+ek4BGsa1=5RGx_WipJSA-e4LhJfZGMrcHO2kCrURRN6=492g@HIDDEN>
Subject: Regarding a bug in suspend-emacs
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary="00000000000069a5800621879863"
Received-SPF: pass client-ip=2001:4860:4864:20::33;
 envelope-from=riza.dindir@HIDDEN; helo=mail-oa1-x33.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sat, 07 Sep 2024 10:43:33 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--00000000000069a5800621879863
Content-Type: text/plain; charset="UTF-8"

Hello

Note: Sending this a second time, I forgot to confirm my request to
register to the bug-gnu-emacs list.

I am running Linux with kernel 6.6.47 and am running emacs in xterm, using
the -nw command line argument.

I am new to emacs and was experimenting with the suspend-emacs command.
Following the example on
https://www.gnu.org/software/emacs/manual/html_node/elisp/Suspending-Emacs.html
.

When following the example, I added the suspend-resume-hook to my
.emacs.d/init.el file. When I run M-: (suspend-emacs "pwd") it does not
show the current working directory. But when I do fg from the terminal that
I got into, I see the "Resumed!" message.

I asked in the libera chat about that, and also in the gnu-help-emacs list.
I have been talking to wasamasa on libera chat (#emacs-beginners) and we
pinpointed the problem to the stuff_char function (in
https://git.savannah.gnu.org/cgit/emacs.git/tree/src/sysdep.c#n403). We
came to this point from stuff_buffered_input (
https://git.savannah.gnu.org/cgit/emacs.git/tree/src/keyboard.c#n11963),
and from  suspend-emacs function definition (in
https://git.savannah.gnu.org/cgit/emacs.git/tree/src/keyboard.c#n11908).

The stuff_char function is using ioctl with TIOCSTI. TIOCSTI requires
CAP_SYS_ADMIN capability. You can set this capability using sysctl setting
dev.tty.legacy_tiocsti to 1.

Unless I had set "dev.tty.legacy_tiocsti" to 1 I could not run the
suspend-emacs command with an argument string.

Either emacs can check the return value of ioctl in stuff_char and if there
return value is EPERM, then handle this accordingly, with a message
regarding the problem.

Or the information relating to the kernel version and CAP_SYS_ADMIN can be
added to the infor page os suspend_emacs, along with the information on how
to set this capability using sysctl.

Kind Regards
Riza Dindir

--00000000000069a5800621879863
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hello</div><div><br></div><div>Note: Sending this a s=
econd time, I forgot to confirm my request to register to the bug-gnu-emacs=
 list.<br></div><div><br></div><div>I am running Linux with kernel 6.6.47 a=
nd am running emacs in xterm, using the -nw command line argument.<br></div=
><div><br></div><div>I am new to emacs and was experimenting with the suspe=
nd-emacs command. Following the example on <a href=3D"https://www.gnu.org/s=
oftware/emacs/manual/html_node/elisp/Suspending-Emacs.html" target=3D"_blan=
k">https://www.gnu.org/software/emacs/manual/html_node/elisp/Suspending-Ema=
cs.html</a>.</div><div><br></div><div>When following the example, I added t=
he suspend-resume-hook to my .emacs.d/init.el file. When I run <span style=
=3D"font-weight:bold">M-: (suspend-emacs &quot;pwd&quot;)</span>
 it does not show the current working directory. But when I do fg from=20
the terminal that I got into, I see the &quot;Resumed!&quot; message.</div>=
<div><br></div><div>I
 asked in the libera chat about that, and also in the gnu-help-emacs=20
list. I have been talking to wasamasa on libera chat (#emacs-beginners)=20
and we pinpointed the problem to the stuff_char function (in <a href=3D"htt=
ps://git.savannah.gnu.org/cgit/emacs.git/tree/src/sysdep.c#n403" target=3D"=
_blank">https://git.savannah.gnu.org/cgit/emacs.git/tree/src/sysdep.c#n403<=
/a>). We came to this point from stuff_buffered_input (<a href=3D"https://g=
it.savannah.gnu.org/cgit/emacs.git/tree/src/keyboard.c#n11963" target=3D"_b=
lank">https://git.savannah.gnu.org/cgit/emacs.git/tree/src/keyboard.c#n1196=
3</a>), and from=C2=A0 suspend-emacs function definition (in <a href=3D"htt=
ps://git.savannah.gnu.org/cgit/emacs.git/tree/src/keyboard.c#n11908" target=
=3D"_blank">https://git.savannah.gnu.org/cgit/emacs.git/tree/src/keyboard.c=
#n11908</a>).</div><div><br></div><div>The stuff_char function is using<spa=
n style=3D"font-family:arial,sans-serif"> ioctl </span>with
 TIOCSTI. TIOCSTI requires CAP_SYS_ADMIN capability. You can set this=20
capability using sysctl setting dev.tty.legacy_tiocsti to 1.</div><div><br>=
</div><div>Unless I had set &quot;dev.tty.legacy_tiocsti&quot;  to 1 I coul=
d not run the suspend-emacs command with an argument string.</div><div><br>=
</div><div>Either
 emacs can check the return value of ioctl in stuff_char and if there=20
return value is EPERM, then handle this accordingly, with a message=20
regarding the problem.</div><div><br></div><div>Or the information=20
relating to the kernel version and CAP_SYS_ADMIN can be added to the=20
infor page os suspend_emacs, along with the information on how to set=20
this capability using sysctl.</div><div><br></div><div>Kind Regards</div><f=
ont color=3D"#888888"><div>Riza Dindir</div></font></div>

--00000000000069a5800621879863--




Acknowledgement sent to Riza Dindir <riza.dindir@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#73101; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

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