Re: fg via keybind modifies tty settings

2024-10-11 Thread David Moberg
Has anyone been able to take a more deep look? Where in the bash source
code would this happen?

I learned that fish resets these kind of settings quite often.

Den tis 24 sep. 2024 16:21Chet Ramey  skrev:

> On 9/20/24 7:23 PM, David Moberg wrote:
>
> > Bash Version: 5.2
> > Patch Level: 21
> > Release Status: release
> >
> > Description:
> >  When a process/job is suspended, foregrounded via ctrl-a as a
> > keybinding for fg, and then
> >  suspended again, the tty will be in a surprising state where no
> > input is seen (-echo)
>
> When the shell starts a job with `fg', it fetches the tty settings so it
> can restore them if the job exits or stops due to a signal. That way, a
> job that modifies the terminal settings, then crashes, doesn't leave the
> terminal in an unusable state.
>
> When you run a command from a readline key binding, it still runs in the
> context of readline obtaining a line from the keyboard -- it's just another
> key binding, like C-f. Readline doesn't reset the tty settings to run the
> binding, and bash doesn't reset them to run the command.
>
> When `fg' runs and starts the job, the shell fetches the tty settings as
> usual, but they are the tty settings readline uses when it's reading input.
> It assumes those are the `normal' settings.
>
> When vim stops due to the SIGTSTP, the shell restores what it thinks are
> the normal tty settings -- the ones it fetched after readline modified
> them. The difference you see between the `working' and `broken' settings
> is what readline does so it can read input.
>
> I will see if this can be changed by having `fg' detect whether it's
> being run from a key binding and not fetch the terminal settings in that
> case.
>
> Chet
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>  ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/
>


Re: fg via keybind modifies tty settings

2024-10-11 Thread Lawrence Velázquez
On Sat, Oct 12, 2024, at 1:11 AM, David Moberg wrote:
> Has anyone been able to take a more deep look?

https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=254081c09767738833cdf161b4bc3feb1a51690a

-- 
vq



Re: A documentation coincidence

2024-10-11 Thread G. Branden Robinson
At 2024-10-11T12:36:47-0400, Chet Ramey wrote:
> On 10/8/24 12:24 PM, G. Branden Robinson wrote:
> > What a coincidence!  I was preparing a big batch of updates myself.
> > Attached for your edification, not so much for integration, as I'm
> > sure many of them won't apply now.
> 
> Thanks for these. I'll take a look and see what applies.

Some of them are still in sketchy, notes-to-self form, and may lack the
amount of justification/background I normally offer.  Feel free to ask
for clarification.

> The docs always get some love as part of the release process. I decided
> to give them a more thorough overhaul this cycle.

Shotts will have to revise his book again... ;-)

Regards,
Branden


signature.asc
Description: PGP signature


Re: A documentation coincidence

2024-10-11 Thread Chet Ramey

On 10/8/24 12:24 PM, G. Branden Robinson wrote:

Hi Chet,

I just saw this pass by:

   commit 9d1eb43fdd363137dd687bc411b14ab4946f939c (HEAD -> devel, origin/devel)
   Author: Chet Ramey 
   Date:   Tue Oct 8 09:52:21 2024 -0400

   First set of documentation updates to man page, texinfo manual

What a coincidence!  I was preparing a big batch of updates myself.
Attached for your edification, not so much for integration, as I'm sure
many of them won't apply now.


Thanks for these. I'll take a look and see what applies.


Reckon I'll see how your updates settle out before restarting this work.

Good to see the docs getting some love.


The docs always get some love as part of the release process. I decided
to give them a more thorough overhaul this cycle.

Chet

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: fg via keybind modifies tty settings

2024-10-11 Thread David Moberg
Thanks! I would have tried it immediately if I knew about it. I will see if
I'm able to try it on Monday. :)

So this kind of bugfix is not enough to ever trigger a new release on its
own? (sounds wise)

Is there any cadence to releases or any other reason to expect a release at
some point in the future?

Den lör 12 okt. 2024 08:02Oğuz  skrev:

> On Saturday, October 12, 2024, David Moberg  wrote:
>
>> This link shows a big commit to bash. Is it merged to main/release? Can I
>> try it out?
>>
>
> You can clone the devel branch to try it out. The master branch is only
> updated for releases and important patches.
>
>
> --
> Oğuz
>
>


Re: fg via keybind modifies tty settings

2024-10-11 Thread David Moberg
Oh, is this already fixed? What am I looking at?

This link shows a big commit to bash. Is it merged to main/release? Can I
try it out?

The commit message is long, does it fix several issues at once?

Den lör 12 okt. 2024 07:29Lawrence Velázquez  skrev:

> On Sat, Oct 12, 2024, at 1:11 AM, David Moberg wrote:
> > Has anyone been able to take a more deep look?
>
>
> https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=254081c09767738833cdf161b4bc3feb1a51690a
>
> --
> vq
>


Re: fg via keybind modifies tty settings

2024-10-11 Thread Oğuz
On Saturday, October 12, 2024, David Moberg  wrote:

> This link shows a big commit to bash. Is it merged to main/release? Can I
> try it out?
>

You can clone the devel branch to try it out. The master branch is only
updated for releases and important patches.


-- 
Oğuz


Re: fg via keybind modifies tty settings

2024-10-11 Thread Lawrence Velázquez
On Sat, Oct 12, 2024, at 1:43 AM, David Moberg wrote:
> Oh, is this already fixed?

Yes.

> What am I looking at?

The commit that fixed it.

> This link shows a big commit to bash. Is it merged to main/release?

No.  It won't be until Chet releases 5.3.

> Can I try it out?

See Oğuz's message.

> The commit message is long, does it fix several issues at once?

Yes.

-- 
vq