Andrew Wood
|
72d9efc993
|
More specific TODOs for one way of implementing #81.
|
2025-10-07 22:17:10 +01:00 |
|
Andrew Wood
|
64c4e8efb9
|
Add TODO markers for one way of implementing #81.
|
2025-10-06 18:03:46 +01:00 |
|
Andrew Wood
|
25dadb2bfd
|
Add a comment describing what this structure is for.
|
2025-10-06 18:01:57 +01:00 |
|
Andrew Wood
|
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).
|
2025-10-05 21:20:27 +01:00 |
|
Andrew Wood
|
3442d7651a
|
Use a void *, not a char *, so the types are consistent throughout.
|
2025-10-05 21:16:34 +01:00 |
|
Andrew Wood
|
7982badb65
|
Write a debugging line when truncating transfers for stop-at-size.
|
2025-10-05 21:15:58 +01:00 |
|
Andrew Wood
|
a83a549de5
|
Correct the value size in the debug statement, otherwise it overflows on 32-bits systems.
|
2025-10-05 21:02:27 +01:00 |
|
Andrew Wood
|
8504964f1a
|
Remove old non-functional code relating to ETAs and --size in the --watchfd loop.
|
2025-10-05 18:07:02 +01:00 |
|
Andrew Wood
|
f83aa2272b
|
Fix incorrect usage of "optarg".
|
2025-10-04 21:51:26 +01:00 |
|
Andrew Wood
|
fb7c05c262
|
Implement the "pgrep" call for --watchfd =NAME (#95).
|
2025-10-04 21:50:25 +01:00 |
|
Andrew Wood
|
bd4ca7301c
|
Document the new "=NAME" (#95) and "@FILE" (#12) syntax for --watchfd options.
|
2025-10-04 20:17:46 +01:00 |
|
Andrew Wood
|
242297a3c6
|
Partial draft of "-d @filename" (#12) and "-d =processname" syntax (#95).
|
2025-10-04 17:46:43 +01:00 |
|
Andrew Wood
|
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.
|
2025-10-04 14:49:06 +01:00 |
|
Andrew Wood
|
11dc25966d
|
If stop_at_size is true, do not read more than control.size even if that is 0 (#166).
|
2025-10-01 18:06:59 +01:00 |
|
Andrew Wood
|
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).
|
2025-09-30 22:27:25 +01:00 |
|
Andrew Wood
|
751263376b
|
Adjust the format and reparse the display, if a remote update -R was received while in the --watchfd loop.
|
2025-09-29 21:42:48 +01:00 |
|
Andrew Wood
|
d903a7d188
|
Add a return value to pv_remote_check() so its caller can know whether a message was received.
|
2025-09-29 21:31:05 +01:00 |
|
Andrew Wood
|
9fe604df1a
|
Move the declaration of changes_made outside the conditional, so as to not break on macOS.
|
2025-09-29 17:53:56 +01:00 |
|
Andrew Wood
|
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.
|
2025-09-28 17:22:56 +01:00 |
|
Andrew Wood
|
10ef5a8596
|
If watching more than one distinct PID with --watchfd, display the PID as well as the FD number (#12).
|
2025-09-28 16:36:06 +01:00 |
|
Andrew Wood
|
77ed2e5989
|
Another minor issue noted as a TODO.
|
2025-09-27 18:32:27 +01:00 |
|
Andrew Wood
|
284ceba52b
|
Add TODO marker after some testing showed an issue.
|
2025-09-27 18:24:59 +01:00 |
|
Andrew Wood
|
3ea19829d7
|
Merge pv_watchpid_loop into pv_watchfd_loop, and allow multiple PID / PID:FD sets to be watched at once (#12).
|
2025-09-27 17:55:18 +01:00 |
|
Andrew Wood
|
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.
|
2025-09-26 23:40:39 +01:00 |
|
Andrew Wood
|
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.
|
2025-09-26 23:01:07 +01:00 |
|
Andrew Wood
|
c61c589378
|
Typo correction in the comment.
|
2025-09-26 22:29:36 +01:00 |
|
Andrew Wood
|
0b2f9ec397
|
Only call pv_watchfd_loop() from main, so that eventually pv_watchpid_loop() can be removed and multiple "-d" values supported (#12).
|
2025-09-24 22:11:44 +01:00 |
|
Andrew Wood
|
a0a9d682ca
|
Reject "-o" when using "-d".
|
2025-09-23 05:45:43 +01:00 |
|
Andrew Wood
|
22bf08f8e4
|
Accept additional arguments when -d is specified, expecting them to be more pid[:fd] values (#12).
|
2025-09-22 21:50:35 +01:00 |
|
Andrew Wood
|
b5fbd1978e
|
Replace watch_pid, watch_fd with arrays, though for now only use the first item in the arrays (#12).
|
2025-09-21 19:50:56 +01:00 |
|
Andrew Wood
|
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).
|
2025-09-18 06:18:18 +01:00 |
|
Andrew Wood
|
8c2e934768
|
Add a TODO marker for the next step to take.
|
2025-09-18 05:47:15 +01:00 |
|
Andrew Wood
|
dbce5b355e
|
Add --watchfd option values to an array in the main state, as well as to the currently used variables (#12).
|
2025-09-17 23:12:13 +01:00 |
|
Andrew Wood
|
12cc996d32
|
Add --watchfd option values to an array as well as to the currently used variables (#12).
|
2025-09-17 22:12:45 +01:00 |
|
Andrew Wood
|
4a0f9e713c
|
Define struct pvwatchspec_s for future use in an array for --watchfd, and add a comment defining nullable_string_t.
|
2025-09-16 23:05:41 +01:00 |
|
Andrew Wood
|
8771b901d9
|
Add TODO markers as part of looking at supporting multiple "-d" options (#12).
|
2025-09-15 20:12:55 +01:00 |
|
Andrew Wood
|
f70627c031
|
Pass through indent.
|
2025-09-14 16:42:08 +01:00 |
|
Andrew Wood
|
1e6c9704b1
|
Adjustments to remove the need for the unqualifiedtrans and nullstate splint workarounds.
|
2025-09-14 16:39:47 +01:00 |
|
Andrew Wood
|
a629a488d7
|
Add TODO marker for the planned next step.
|
2025-07-28 20:39:05 +01:00 |
|
Andrew Wood
|
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).
|
2025-07-28 00:25:14 +01:00 |
|
Andrew Wood
|
4f9d746823
|
Split the state reset functions into smaller pieces, so sub-structures can be reset individually (#165).
|
2025-07-27 23:24:56 +01:00 |
|
Andrew Wood
|
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).
|
2025-07-27 21:39:36 +01:00 |
|
Andrew Wood
|
9ab82cde1e
|
Use the original info_aray size for comparison as the "control" structure may be made irrelevant here soon (#165).
|
2025-07-27 21:38:55 +01:00 |
|
Andrew Wood
|
a7f392e3c3
|
Address splint warnings about setting and clearing state->control.name (#165).
|
2025-07-27 21:34:46 +01:00 |
|
Andrew Wood
|
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).
|
2025-07-27 21:23:41 +01:00 |
|
Andrew Wood
|
5282a521b5
|
Pass only the relevant sub-structure to pv_alloc_history (#165).
|
2025-07-27 20:59:21 +01:00 |
|
Andrew Wood
|
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)
|
2025-07-27 20:51:00 +01:00 |
|
Andrew Wood
|
a0f2d9c9c7
|
Use status, cursor from main state, and a null extra_display, to reduce the dependency on the per-watched-fd state (#165).
|
2025-07-27 20:46:51 +01:00 |
|
Andrew Wood
|
8386c05978
|
Explicitly check for non-NULL rather than treating NULL as boolean false.
|
2025-07-27 20:43:52 +01:00 |
|
Andrew Wood
|
6a2b9a2788
|
Add an alias for the name for %N to the display sub-structure, so that the name can be varied between displays without having to alter the control value (#165).
|
2025-07-27 19:53:28 +01:00 |
|