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.
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
tail: fix issue #6543 (--pid when reading from stdin) #6582
base: main
Are you sure you want to change the base?
tail: fix issue #6543 (--pid when reading from stdin) #6582
Changes from 3 commits
addf7b5
03b3bf1
05262b6
aa8f2af
bbefeba
cbbef09
520e8b8
b242461
465ef45
731e4e1
fed2705
a4cc3a7
e7d1c0b
1ade9ac
0811fea
73bbd9a
bcc144b
b8c5bc8
b120a56
8c5097a
1f0d9d5
98c546f
09e2610
59aea7e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After killing
sleep
, we have a perfect opportunity to quickly check thattail
really does terminate by itself. Maybe insert something like this?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, for checking if it's
is_alive
, why notis_not_alive
. Running the commands manually, I confirm that the tail exits after sleep exits, and after it's killed. But, I changed it tois_not_alive
, and it failed on Linux. Although it passed on Windows. I need to switch back over to Windows and confirm it's breaking nowThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To answer my previous question, I believe it should be
is_not_alive
, and the cause for failure was because sleep's parent was the Rust test program, and without exiting, and without reaping, it became a zombie. However, the libc kill function inis_dead
saw it as still alive (returning0
), and the reason the program exited before was because ofrecv_timeout(settings.sleep_sec)
in watch.rs (currently line 532 in this commit), which I assume errored out, leading to the program ending, and leading to the appearance that it detected the pid specified dying and following suite, when it wasn't actually the case.