-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dhcpcd: stdout output sometimes empty when redirected to a file (#364)
Running dhpcd --dumplease with input from stdin and redirecting stdout to a file outputs nothing to the output. The reason is that printf / fprintf is used to write the output but it is not explicitly flushed when done, or before exiting, and stdout to files is fully buffered by default while stdout to terminals is line buffered by default. This adds calls to fflush() at the end of dhcp_print_option_encoding() and script_dump(), plus one just before exiting dhcpcd. Signed-off-by: Diego Santa Cruz <[email protected]>
- Loading branch information
1 parent
d6c8537
commit dc9cbc3
Showing
3 changed files
with
3 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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