Open
Conversation
Add the ability to create a FIFO file that is not rolled over every hour
Author
|
I have found an error where this PR cancels other outputs. What is the correct protocol for asking you to wait until I've made corrections before you review? Do I close this PR? |
Collaborator
No problem. Just let me know when it's ready for review. |
Add select call to check if the FIFO is being read. Add fdata->fd as integer for the open() file descriptor.
Author
|
OK. The FIFO file write was blocking when there was no reader. I have resolved that by opening the FIFO in NONBLOCK mode, and then checking for a reader before writing. |
Author
|
Hmm.. stand by on checking - Found some issues. Sorry. |
Collaborator
|
How's this coming along? I landed a PR that may create a bit of merging work for you. Just a heads up. |
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 PR is to add the ability to create a FIFO file that is not rolled over every hour.
This adds the output option of
type = "fifofile".Currently I have only tested that the FIFO is created, populated and not terminated every hour.
I have also added an example config to show how I am using the FIFO outputs.
I am not happy with the code replication that I have introduced, but as first PR I thought I'd submit working code, then in a later PR I can refactor the
elseifconcerningrawfileandfifofileto reduce this for readability and maintainability. I figured that this format of change in the code would be easier to follow rather than immediately introducing the refactoring also.This is my first ever PR anywhere (I have submitted patches to projects previously though - just to give away my age :-/ ), so If I have got anything wrong, please be gentle, but advise so I can correct.
Also, if I have not followed best practices, or could do something to make your job as a maintainer easier, please also advise so I can rectify and learn.