git: fetch - Fix -T timeout operation for additional cases

Matthew Dillon dillon at crater.dragonflybsd.org
Sun Jul 10 20:42:56 PDT 2022


commit f50a4783ced76e1cc7d8009aa3a1f10eb4a3bef9
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Jul 10 20:40:46 2022 -0700

    fetch - Fix -T timeout operation for additional cases
    
    * The -T timeout flag does not always timeout the program.  The
      implementation only tested it during the initial connection and
      header fetch, not during data transfers.
    
    * Makme the -T timeout apply to data transfers.  However, any progress
      on the transfer resets the timer.
    
    * Volatilize several variables that need it, and add an interlock
      to deal with alarm() races.  Also, when the SIGALRM occurs, if
      still enabled it will be re-armed and fire off every second thereafter
      until processed, since the alarm might not catch a blocked system call
      in progress.

Summary of changes:
 usr.bin/fetch/fetch.1 |  2 ++
 usr.bin/fetch/fetch.c | 47 +++++++++++++++++++++++++++++++++++++----------
 2 files changed, 39 insertions(+), 10 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f50a4783ced76e1cc7d8009aa3a1f10eb4a3bef9


-- 
DragonFly BSD source repository


More information about the Commits mailing list