1a70cc228a
Correction to the description and removal of the TODO marker; and use the transfer interval as the time to wait after closure (#81).
Andrew Wood2025-10-17 22:50:33 +01:00
17ca4fc9c9
Keep displaying --watchfd fds for a short time after they are closed, and don't clear the display at the end but just move the cursor past it (#81).
Andrew Wood2025-10-17 20:40:14 +01:00
0aac6d6aac
Add comments and "pid_last_seen", "fd_last_seen" structure members for proposed new logic that will hold fd info on-screen a short time after closure, to retain the progress display when a watched process exits (#81).
Andrew Wood2025-10-17 19:09:46 +01:00
61021eab6b
Remove the TODO markers for #81 as this work will be done in a separate branch.
Andrew Wood2025-10-17 17:52:33 +01:00
e59452d765
Add a note describing the apparent lack of output file growth during transfer of null bytes with --sparse (#45).
Andrew Wood2025-10-16 21:13:43 +01:00
d2647ac55c
Line number updates, and remove incorrect fuzzy entries.
Andrew Wood2025-10-15 23:46:04 +01:00
972f8b7df8
Re-order no_splice and sparse_output relative to other flags to more closely match the order they appear in the manual.
Andrew Wood2025-10-15 23:23:16 +01:00
3c9ab822fe
Call lseek() at the start if output is appending, so that future lseek()s are relative to the right position, fixing the issue with incorrect truncation size (#45).
Andrew Wood2025-10-15 23:08:33 +01:00
fb5ce33518
Add debugging messages about truncation and seeking (#45).
Andrew Wood2025-10-15 22:43:56 +01:00
5c15337662
Only call ftruncate() once, when the output file descriptor is closed at the end, instead of after every lseek() - this corrects the file growth on XFS but has the side effect that writing to stdout in >> (append) mode truncates the file to the wrong size (#45).
Andrew Wood2025-10-15 22:32:21 +01:00
71f929e29c
Add a TODO indicating the problems so far and what to try next (#45).
Andrew Wood2025-10-15 17:49:38 +01:00
c21ad6fdf1
For sparse output, instead of fstat(), ftruncate(), then lseek(), do lseek() then ftruncate(), like dd does (#45).
Andrew Wood2025-10-14 23:38:15 +01:00
f0895177e7
Remove comment lines from the lab-hosts config when reading it.
Andrew Wood2025-10-14 22:11:40 +01:00
72686655cf
Move the pv__transfer_write_completed label, jumped to on a sparse write, outside of the compound statement; and so, move all of the variables within that compound statement to the start of the function. The GCC on RHEL derivatives like AlmaLinux 9, Rocky 8, CentOS 7/6/5 throws an error if the label is at the end of that block rather than just outside it (#45).
Andrew Wood2025-10-14 22:03:41 +01:00
54913fddbe
First working draft of --sparse transfers, tests still needed (#45).
Andrew Wood2025-10-13 22:13:54 +01:00
023cf22a59
Add --sparse / -O to the manual, to --help, and to option processing (#45).
Andrew Wood2025-10-13 21:26:24 +01:00
164d7f7738
Add the extra --watchfd syntax to the help for that option.
Andrew Wood2025-10-13 17:58:37 +01:00
6b8acd9e01
Add sparse_output option and control flags, and an output_not_seekable transfer flag, to structures for "sparse output" mode in future (#45).
Andrew Wood2025-10-12 18:12:43 +01:00
f18fa637c6
Merge pull request 'Translations update from Codeberg Translate' (#168) from translate/pv:weblate-pv-pv into main
Andrew Wood2025-10-05 22:34:50 +02:00
771b61db30
Add test for over-read when using stop-at-size (#166).
Andrew Wood2025-10-05 21:33:32 +01:00
615c1d5321
Explicitly cast both sides of the comparison to "long long", otherwise there is an overflow on 32-bit systems and stop-at-size stops at the wrong point (#166).
Andrew Wood2025-10-05 21:20:27 +01:00
3442d7651a
Use a void *, not a char *, so the types are consistent throughout.
Andrew Wood2025-10-05 21:16:34 +01:00
7982badb65
Write a debugging line when truncating transfers for stop-at-size.
Andrew Wood2025-10-05 21:15:58 +01:00
a83a549de5
Correct the value size in the debug statement, otherwise it overflows on 32-bits systems.
Andrew Wood2025-10-05 21:02:27 +01:00
b1797c51e6
Note the new "=NAME" and "@LISTFILE" syntax additions to --watchfd.
Andrew Wood2025-10-05 18:10:41 +01:00
8504964f1a
Remove old non-functional code relating to ETAs and --size in the --watchfd loop.
Andrew Wood2025-10-05 18:07:02 +01:00
bd4ca7301c
Document the new "=NAME" (#95) and "@FILE" (#12) syntax for --watchfd options.
Andrew Wood2025-10-04 20:17:46 +01:00
242297a3c6
Partial draft of "-d @filename" (#12) and "-d =processname" syntax (#95).
Andrew Wood2025-10-04 17:46:43 +01:00
0a658f99bb
In --watchfd, when deciding whether to insert %N into the format, check for %{name} in the current format as well as the existing check for %N.
Andrew Wood2025-10-04 14:49:06 +01:00
8df1c29c37
Note the addition of an empty Finnish translation file.
Andrew Wood2025-10-04 00:54:48 +01:00
a8b7cd19bd
Add an empty translation file for Finnish.
Andrew Wood2025-10-03 23:03:38 +01:00
b4f525fd79
Merge pull request 'Translations update from Codeberg Translate' (#167) from translate/pv:weblate-pv-pv into main
Andrew Wood2025-10-02 22:31:05 +02:00
be066f6c8c
Restrict the amount to read when --stop-at-size is active so that reads, as well as writes, never go past --size bytes (#166).
Andrew Wood2025-09-30 22:27:25 +01:00
6a1ad7d374
Note the improvement to the control of a --watchfd with a remote -R.
Andrew Wood2025-09-29 22:05:47 +01:00
751263376b
Adjust the format and reparse the display, if a remote update -R was received while in the --watchfd loop.
Andrew Wood2025-09-29 21:42:48 +01:00
d903a7d188
Add a return value to pv_remote_check() so its caller can know whether a message was received.
Andrew Wood2025-09-29 21:31:05 +01:00
9fe604df1a
Move the declaration of changes_made outside the conditional, so as to not break on macOS.
Andrew Wood2025-09-29 17:53:56 +01:00
64cd9cd85c
Move the watchfd %N format insertion into its own function, so it can be called separately elsewhere in future, and to make it easier to extend the %N detection to find %{name} later as well.
Andrew Wood2025-09-28 17:22:56 +01:00
10ef5a8596
If watching more than one distinct PID with --watchfd, display the PID as well as the FD number (#12).
Andrew Wood2025-09-28 16:36:06 +01:00
77ed2e5989
Another minor issue noted as a TODO.
Andrew Wood2025-09-27 18:32:27 +01:00
8ae549c47f
Mention the --watchfd multiple arguments feature (#12).
Andrew Wood2025-09-27 18:31:24 +01:00
284ceba52b
Add TODO marker after some testing showed an issue.
Andrew Wood2025-09-27 18:24:59 +01:00
3ea19829d7
Merge pv_watchpid_loop into pv_watchfd_loop, and allow multiple PID / PID:FD sets to be watched at once (#12).
Andrew Wood2025-09-27 17:55:18 +01:00
c49fc4aa57
Eliminate the fd_to_idx array in --watchfd, so that file descriptors aren't constrained to FD_SETSIZE and so we don't have to track another array.
Andrew Wood2025-09-26 23:40:39 +01:00
7fdb6716e1
In the pvwatchfd_s structure, use booleans "displayable" and "unused" instead of having values of watch_pid=0 for unused and watch_fd=-1 for not displayable, so that each item only means one thing.
Andrew Wood2025-09-26 23:01:07 +01:00
c688987087
Adjust the --watchfd documentation to say that multiple PID/PID:FD arguments are allowed (#12).
Andrew Wood2025-09-25 06:21:55 +01:00
0b2f9ec397
Only call pv_watchfd_loop() from main, so that eventually pv_watchpid_loop() can be removed and multiple "-d" values supported (#12).
Andrew Wood2025-09-24 22:11:44 +01:00
8a8e6d71a4
Reinstate the previously removed "cannot transfer files" message for "-d".
Andrew Wood2025-09-23 05:46:53 +01:00
05a72bf75e
Position updates, two new strings, one old message removed.
Andrew Wood2025-09-23 05:39:43 +01:00
22bf08f8e4
Accept additional arguments when -d is specified, expecting them to be more pid[:fd] values (#12).
Andrew Wood2025-09-22 21:50:35 +01:00
b5fbd1978e
Replace watch_pid, watch_fd with arrays, though for now only use the first item in the arrays (#12).
Andrew Wood2025-09-21 19:50:56 +01:00
db80f838ff
Explicitly set an action variable to say which action to perform, instead of inferring it from other settings like whether a watch PID was set (#12).
Andrew Wood2025-09-18 06:18:18 +01:00
8c2e934768
Add a TODO marker for the next step to take.
Andrew Wood2025-09-18 05:47:15 +01:00
dbce5b355e
Add --watchfd option values to an array in the main state, as well as to the currently used variables (#12).
Andrew Wood2025-09-17 23:12:13 +01:00
12cc996d32
Add --watchfd option values to an array as well as to the currently used variables (#12).
Andrew Wood2025-09-17 22:12:45 +01:00
4a0f9e713c
Define struct pvwatchspec_s for future use in an array for --watchfd, and add a comment defining nullable_string_t.
Andrew Wood2025-09-16 23:05:41 +01:00
8771b901d9
Add TODO markers as part of looking at supporting multiple "-d" options (#12).
Andrew Wood2025-09-15 20:12:55 +01:00
1e6c9704b1
Adjustments to remove the need for the unqualifiedtrans and nullstate splint workarounds.
Andrew Wood2025-09-14 16:39:47 +01:00
a629a488d7
Add TODO marker for the planned next step.
Andrew Wood2025-07-28 20:39:05 +01:00
ad1d0e1c9a
In the watchfd info array, instead of using copies of the global state, each fd has its own flags, transfer, calc, and display sub-structures (#165).
Andrew Wood2025-07-28 00:25:14 +01:00
4f9d746823
Split the state reset functions into smaller pieces, so sub-structures can be reset individually (#165).
Andrew Wood2025-07-27 23:24:56 +01:00
9fc9b6a8ed
Carry the fd info_array "size" into the global "control" structure just before calling pv_display() so it gets used without having to have a per-fd copy of "control" (#165).
Andrew Wood2025-07-27 21:39:36 +01:00
9ab82cde1e
Use the original info_aray size for comparison as the "control" structure may be made irrelevant here soon (#165).
Andrew Wood2025-07-27 21:38:55 +01:00
a7f392e3c3
Address splint warnings about setting and clearing state->control.name (#165).
Andrew Wood2025-07-27 21:34:46 +01:00
574ea04502
Instead of adding an aliased display name and having to maintain it and treat it differently, go back to keeping the name only in the "control" sub-structure of the state, but share the global state "control" across all watched fds, and just change it before each pv_display() call so it points to the relevant fd display_name when needed (#165).
Andrew Wood2025-07-27 21:23:41 +01:00
5282a521b5
Pass only the relevant sub-structure to pv_alloc_history (#165).
Andrew Wood2025-07-27 20:59:21 +01:00
52634f01f9
Do not call pv_state_name_set when adjusting an fd display_name, but instead set the alias state->display.name ourselves. Since the fd display_name we are pointing to is within the info_array, if we extend info_array with realloc we then have to also reset those aliases since display_name may move if realloc rebases the array. (#165)
Andrew Wood2025-07-27 20:51:00 +01:00
a0f2d9c9c7
Use status, cursor from main state, and a null extra_display, to reduce the dependency on the per-watched-fd state (#165).
Andrew Wood2025-07-27 20:46:51 +01:00
8386c05978
Explicitly check for non-NULL rather than treating NULL as boolean false.
Andrew Wood2025-07-27 20:43:52 +01:00