• Uncategorized

About c# : Continously-recieve-input-from-process-in-NET-on-Linux

Question Detail

On many Linux variants, a systemd subsystem controls startup and execution of daemons (aka Windows Services analogy).

If one wants to subscribe to events that happen with systemd units, one option would be to run a tool called journalctl with --follow switch. In that case the output of the journalctl execution will not be immediate, but will be a constant stream of text data that will contain information of interest.

How, using a .NET 5/C# one could invoke journalctl (probably via System.Diagnostics.Process) in a manner that the continuous stream output can be “monitored” by the application code as it arrives?

journalctl case is just an easily testable example of such “piping” source in Linux and is not directly related to the approach-of-interested.

Question Answer

No answer for now.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.