* bug#73101: Regarding a bug in suspend-emacs
@ 2024-09-07 13:34 Riza Dindir
2024-09-07 15:22 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Riza Dindir @ 2024-09-07 13:34 UTC (permalink / raw)
To: 73101
[-- Attachment #1: Type: text/plain, Size: 1845 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 2718 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#73101: Regarding a bug in suspend-emacs
2024-09-07 13:34 bug#73101: Regarding a bug in suspend-emacs Riza Dindir
@ 2024-09-07 15:22 ` Eli Zaretskii
2024-09-07 15:42 ` Riza Dindir
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2024-09-07 15:22 UTC (permalink / raw)
To: Riza Dindir; +Cc: 73101
merge 73101 73100
thanks
> From: Riza Dindir <riza.dindir@gmail.com>
> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#73101: Regarding a bug in suspend-emacs
2024-09-07 15:22 ` Eli Zaretskii
@ 2024-09-07 15:42 ` Riza Dindir
0 siblings, 0 replies; 3+ messages in thread
From: Riza Dindir @ 2024-09-07 15:42 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 73101
[-- Attachment #1: Type: text/plain, Size: 464 bytes --]
I apologize for the duplicate.
On Sat, Sep 7, 2024, 18:22 Eli Zaretskii <eliz@gnu.org> wrote:
> merge 73101 73100
> thanks
>
> > From: Riza Dindir <riza.dindir@gmail.com>
> > 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.
>
[-- Attachment #2: Type: text/html, Size: 852 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-07 15:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-07 13:34 bug#73101: Regarding a bug in suspend-emacs Riza Dindir
2024-09-07 15:22 ` Eli Zaretskii
2024-09-07 15:42 ` Riza Dindir
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).