-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failure on Pipeing dumplease from file #388
Comments
I just ran this through the debugger to try to figure out what was happening. It seems that all the printf's for each line are called, and sanity checking the return value of one of the printf's was not in error. I was wondering if it was related to the the resource limits but that seems to not be the case (e.g., skipping |
Is it actually fetching the lease from the file? I noticed that if I backup a lease file, and then try to use stdin to load it, it prints the current lease, not the backup. |
Differences between my setup and your would be the version and I'm not running dhcpcd in managed mode. I am seeing the read call for stdin get hit and the contents match the file. I can even dumplease without any other dhcpcd process running (no other dhcpcd process is running before or after the call). |
When I run the same options as you it but with 10.0.10 says dhdpcd is not running and does not print the lease. Maybe something changed since 10.0.6 |
As noted I'm also on Musl libc, and I saw all the print with each string being hit. I haven't a clue what could go wrong between there and the pipe. So maybe it's something there? |
You need to give the interface name |
I have tried using the
When I run without pipeing from the ioctl on changes to the following which doesn't appear different with/without the
|
I cannot replicate this on alpine-3.20 which uses musl-1.2.5 If it still fails, can you try Note: The close(-1) at the end of the trace is due to closelog(3). openlog(3) was actually called earlier but no log entry was written. I've addressed this in fd2f663. |
When trying to run something like the following I only get a single line of text output when piping it into another program.
dhcpcd -4 --dumplease < /var/lib/dhcpcd/eth0.lease
outputs the following as expected
When trying to pipe the output to another program (or read from
popen
)Will display the following.
Similarly if piped into
wc
it will display a count of words/chars in that lineNotable details is musl libc 1.2.4 and dhcpcd 10.0.6 (packaged together in a Yocto scarthgap build) I can provide more information if needed. I have straces but I doubt their utility
The text was updated successfully, but these errors were encountered: