[Top][All Lists]

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

[screen-devel] [bug #63341] Copy mode (Ctrl-A ESC) blocks stdout

From: anonymous
Subject: [screen-devel] [bug #63341] Copy mode (Ctrl-A ESC) blocks stdout
Date: Thu, 10 Nov 2022 14:24:56 -0500 (EST)


                 Summary: Copy mode (Ctrl-A ESC) blocks stdout
                 Project: GNU Screen
               Submitter: None
               Submitted: Thu 10 Nov 2022 07:24:54 PM UTC
                Category: Program Logic
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
                 Release: None
         Discussion Lock: Any
           Fixed Release: None
         Planned Release: None
           Work Required: None


Follow-up Comments:

Date: Thu 10 Nov 2022 07:24:54 PM UTC By: Anonymous

#!/usr/bin/env python3
import time
with open("/tmp/scroll", mode="w") as f:
    t1 = time.time()
    while True:
        t2 = time.time()
        tdiff = t2 - t1
        t1 = t2
        text = f"tdiff={tdiff} {'!!!!!!!!' if tdiff > 0.5 else ''}"
        print(text, flush=True)
        print(text, flush=True, file=f)

Steps to reproduce:

- Run './' in a screen session
- Run 'tail -f /tmp/scroll' in another terminal
- Press 'Ctrl-A ESC' to enter copy mode

After a few seconds, the 'tail' output freezes.  Exiting copy mode generates
this output:

tdiff=5.808627605438232 !!!!!!!!

I think this behavior is a bug, because it violates the principle of least
surprise.  Scrolling up or selecting text in a terminal should never block
program execution. Screen could be a nice tool for running simple daemons,
except that copy mode is basically an outage generator.

What could screen do when the scrollback buffer is full?
1. Kick the user out of copy mode
2. Make a copy of the currently-visible buffer region


Reply to this item at:


Message sent via Savannah

reply via email to

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