NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/58281: ftp(1) should have a strict failure exit code option
>Number: 58281
>Category: bin
>Synopsis: ftp(1) should have a strict failure exit code option
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat May 25 12:10:01 +0000 2024
>Originator: Martin Husemann
>Release: NetBSD 10.0_STABLE
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD emmas.aprisoft.de 10.0_STABLE NetBSD 10.0_STABLE (EMMAS) #7: Sun Apr 28 16:05:18 CEST 2024 martin%seven-days-to-the-wolves.aprisoft.de@localhost:/work/src-10/sys/arch/amd64/compile/EMMAS amd64
Architecture: x86_64
Machine: amd64
>Description:
It is possible to use ftp(1) in scripts to auto-download e.g. software
updates. But if the connection fails midway (due to network issues)
a sucess error code is returned to the shell. This makes auto-update
scripts prone to silent failure.
Example:
Requesting https://.....
4% |* | 6779 KiB 9.78 KiB/s 4:30:23 ETA
6941845 bytes retrieved in 11:32 (9.78 KiB/s)
and exit status is zero. As you can see from the transfer rate the connection
was ... challenged, and something timed out and droped the whole connection
midway. The client does not report this in any way that I can find, and
the announced size of the file is not easily available to the script
unless the whole application transfers a manifest first.
>How-To-Repeat:
s/a
>Fix:
Add a command line option to force the exit status to indicate failure
if less than the original announced number of bytes have been received?
Home |
Main Index |
Thread Index |
Old Index