Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > muc.lists.netbsd.source-changes > #156110
| From | Taylor R Campbell <riastradh@NetBSD.org> |
|---|---|
| Newsgroups | muc.lists.netbsd.source-changes |
| Subject | Re: bin/59587: ftp client ascii transfers with progress report fail |
| Date | 2026-01-15 04:19 +0000 |
| Organization | Newsgate at muc.de e.V. |
| Message-ID | <20260115041953.E830784D34@mail.netbsd.org> (permalink) |
| References | <20260115035129.CE0BE855C4@mail.netbsd.org> |
> Date: Thu, 15 Jan 2026 03:51:28 +0000 > From: Taylor R Campbell <riastradh@NetBSD.org> > > > Module Name: src > > Committed By: lukem > > Date: Sat Dec 6 06:20:23 UTC 2025 > > > > Modified Files: > > src/usr.bin/ftp: extern.h ftp.c util.c version.h > > > > Log Message: > > ftp: fix ascii transfers with progress bar > > > > Handle stdio interruption by signals and improve error handling > > in getc() and putc() on the control and data channels. > > Provide ftp_getc() and ftp_putc() wrappers that: > > - Retry the operation on EINTR or EAGAIN instead of failing. Alternatively: Why not use SA_RESTART, so you don't have to track down all the I/O logic that might be interrupted by a signal and arrange to run it in a loop? There's nothing here that behaves differently if it received a signal, like printing a progress bar if the I/O was interrupted by a signal -- that's already done in the signal handler itself, isn't it? (Except you should probably use snprintf_ss, not snprintf, in progressbar.c, if you want to print the progress bar in the signal handler itself: snprintf is technically not async-signal-safe. In practice on NetBSD, though, I think it matters only for the floating-point formatters, which may use malloc in gdtoa; the rest of it like %d and %s is probably safe.) -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Back to muc.lists.netbsd.source-changes | Previous | Next — Previous in thread | Next in thread | Find similar
Re: bin/59587: ftp client ascii transfers with progress report fail Taylor R Campbell <riastradh@NetBSD.org> - 2026-01-15 03:51 +0000
Re: bin/59587: ftp client ascii transfers with progress report fail Taylor R Campbell <riastradh@NetBSD.org> - 2026-01-15 04:19 +0000
Re: bin/59587: ftp client ascii transfers with progress report fail Luke Mewburn <luke@mewburn.net> - 2026-01-15 16:34 +1100
Re: bin/59587: ftp client ascii transfers with progress report fail Taylor R Campbell <riastradh@NetBSD.org> - 2026-01-15 23:56 +0000
Re: bin/59587: ftp client ascii transfers with progress report fail Luke Mewburn <luke@mewburn.net> - 2026-01-15 16:26 +1100
csiph-web