simon-git: putty (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Mon Sep 23 09:45:16 BST 2024


TL;DR:
  fca6ce10 Unix Pageant: make stdout line-buffered in --debug mode.
  2b934173 Support running UNIX Pageant in foreground mode, without debugging output
  10b5c116 pageant --foreground: close stdout after printing env setup.

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: main
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2024-09-23 09:45:15

commit fca6ce10dbf01e57ec4777b87faae8b38e53ff43
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=fca6ce10dbf01e57ec4777b87faae8b38e53ff43;hp=2c774371496f57ce0601118b5b63f8fce2806634
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon Sep 23 09:13:16 2024 +0100

    Unix Pageant: make stdout line-buffered in --debug mode.
    
    My normal usage of --debug is to run it in a terminal, where it starts
    by printing its SSH_AUTH_SOCK setting for me to paste into another
    terminal to run test commands, and then follows that with diagnostic
    logging of the requests it's receiving.
    
    But if you'd rather get that diagnostic information in some location
    other than a terminal – say, sent to a file which you're viewing in
    'less' so that you can search back and forth in it, or piped to
    another machine because your test requests are going to come from
    somewhere out of sight of your monitor – then you might run 'pageant
    --debug' with its stdout being a pipe or a file rather than a
    terminal, in which case the standard stdio policy will make it
    unbuffered, and the diagnostics won't show up in a timely manner.
    
    The one-line code change is due to Marco Ricci, who had a rather
    different motivation.

 unix/pageant.c | 5 +++++
 1 file changed, 5 insertions(+)

commit 2b93417398f641e410f0b3564135508ebfb71ac0
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=2b93417398f641e410f0b3564135508ebfb71ac0;hp=fca6ce10dbf01e57ec4777b87faae8b38e53ff43
Author: Marco Ricci <software at the13thletter.info>
Date:   Wed Sep 18 20:04:31 2024 +0200

    Support running UNIX Pageant in foreground mode, without debugging output
    
    This new mode makes it easy to run Pageant as a "supervised" instance,
    e.g. as part of a test harness for other programs interacting with an
    SSH agent, which is the original use case. Because Pageant is then
    running as a child process of the supervisor, the operating system
    notifies the supervisor of the child's aliveness without resorting to
    PIDs or socket addresses, both of which may principally run stale and/or
    get recycled.

 doc/man-pageant.but | 14 ++++++++++++--
 unix/pageant.c      |  8 +++++++-
 2 files changed, 19 insertions(+), 3 deletions(-)

commit 10b5c1163c25792142c13f5eee0df4f93c27aaa2
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=10b5c1163c25792142c13f5eee0df4f93c27aaa2;hp=2b93417398f641e410f0b3564135508ebfb71ac0
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon Sep 23 09:16:14 2024 +0100

    pageant --foreground: close stdout after printing env setup.
    
    This is a small refinement of my own to Marco Ricci's new mode
    introduced by the previous commit. If Pageant is being run by a parent
    process intending to make requests to it, then it's probably put a
    pipe on Pageant's stdout, and will be reading from that pipe to
    retrieve the environment setup commands. So it needs to know when it's
    read enough.
    
    Closing stdout immediately makes this as easy as possible, freeing the
    parent process of the need to count lines of output (and also know how
    many lines to expect): it can simply read until there's no more data.
    
    This also means there's no need to make stdout line-buffered, of
    course – the fclose will flush it anyway.

 doc/man-pageant.but | 9 +++++++++
 unix/pageant.c      | 4 +++-
 2 files changed, 12 insertions(+), 1 deletion(-)



More information about the tartarus-commits mailing list