Option 1: Workaround for broken stdin logic#288
Closed
holmanb wants to merge 1 commit intoNetworkConfiguration:masterfrom
Closed
Option 1: Workaround for broken stdin logic#288holmanb wants to merge 1 commit intoNetworkConfiguration:masterfrom
holmanb wants to merge 1 commit intoNetworkConfiguration:masterfrom
Conversation
Previous code used the non-existance of data in the input buffer to determine whether to attempt parsing from stdin. This is racy, so `dhcpcd -U < /path/to/lease` will sometimes fail: # dhcpcd --dumplease --ipv4only < /var/lib/dhcpcd/<iface>.lease dhcpcd is not running The fix uses the (non-)existance of an interface argument to indicate that dhcpcd should wait for data to arrive on stdin. Fixes NetworkConfiguration#285
This was referenced Jan 20, 2024
Member
|
Yes, we don't want this change of behavior. Your other approach is better even though it will break existing scripts that use it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is my original proposal to fix #285. It just checks if there was an interface passed and then forces stdin parsing if no interface was passed.
After I implemented it, I read the docs and realized that when no interface was passed, and no stdin is piped that in theory this means that all interfaces should be dumped:
Since this approach breaks the intended user interface, I originally assumed you didn't want it. However, after I implemented the second option I realized that this documented behavior that option 2 designs around is also broken.
Continued discusion of the options for #285 in the second PR.