bugGNU Screen - Bugs: bug #25611, PLease return shell error code:...


bug #25611: PLease return shell error code: screen -r -X select INVALID-NAME

Submitter:  Jari Aalto <jaalto>
Submitted:  Tue 17 Feb 2009 06:40:05 PM UTC
Category:  Program Logic Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Release:  None
Fixed Release:  5.0.0 Planned Release:  5.0.0
Work Required:  None
* Mandatory Fields

Add a New Comment Rich Markup

Tue 02 Jul 2024 07:07:56 PM UTC, comment #3: 

Ok, what we have now:

% screen -v
Screen version 4.99.0 (build on 2024-05-31 16:05:06)
% screen -r -X select INVALID-NAME
No screen session found.
% echo $?

In case of using wrong/invalid name:

% screen -r -X select INVALID-NAME
There are several suitable screens on:
        71771.pts-73.fs (Detached)
        72073.pts-73.fs (Detached)
        72420.pts-73.fs (Detached)
        78536.pts-146.fs        (Detached)
        73931.pts-73.fs (Detached)
        74872.pts-73.fs (Detached)
        72250.pts-73.fs (Detached)
        73245.pts-73.fs (Detached)
        73407.pts-73.fs (Detached)
        72646.pts-73.fs (Detached)
        60093.pts-63.fs (Detached)
        71616.pts-73.fs (Detached)
        74715.pts-73.fs (Detached)
        70798.pts-73.fs (Detached)
        73063.pts-73.fs (Detached)
        71099.pts-73.fs (Detached)
        60227.pts-63.fs (Detached)
        66981.fff       (Detached)
        72782.pts-73.fs (Detached)
        74123.pts-73.fs (Detached)
        73685.pts-73.fs (Detached)
        71462.pts-73.fs (Detached)
Use -S to specify a session.
% echo $?


Alexander Naumov <anaumov>
Group administrator
Sun 30 Jun 2024 06:47:57 PM UTC, comment #2: 

Screen 4.99.0 on Fedora 40

user@fedora:~$ screen -r -X select 2
No screen session found.
user@fedora:~$ echo $?

Also hints about current sessions are provided if they exist =)


Julian <juyret>
Sun 06 Sep 2009 01:48:55 PM UTC, comment #1: 

Except the request didn't fail, since the command was sent successfully.

What OP is asking for would require bidirectional communication with the backend, without attaching, which appears non-trivial at first glance.

Perhaps an alternative is some kind of minimal-attach mode, to only receive messages, but that strikes me as even more difficult.

Max Kalashnikov <maxkalashnikov>
Tue 17 Feb 2009 06:40:05 PM UTC, original submission:  


   $ screen -r -X select INVALID-NAME
   $ echo $?

Please return non-zero status code when the command line option request fails, like in this case.

Jari Aalto <jaalto>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by anaumov (Posted a comment)
  • -email is unavailable- added by juyret (Posted a comment)
  • -email is unavailable- added by maxkalashnikov (Posted a comment)
  • -email is unavailable- added by jaalto (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-07-02 anaumov CategoryNone Program Logic
        StatusNone Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 5.0.0
        Planned ReleaseNone 5.0.0

    Back to the top

    Powered by Savane 3.13-b921.
    Corresponding source code