well-typed / ghc-eventlog-socket

Pipe the GHC eventlog stream to a UNIX domain socket
BSD 3-Clause "New" or "Revised" License
15 stars 6 forks source link

Document trade-offs with using a named pipe #5

Open TeofilC opened 2 years ago

TeofilC commented 2 years ago

How does this project improve on writing the eventlog to a named pipe, eg:

mkfifo eventlog-pipe
process-eventlog eventlog-pipe &
exec app +RTS -l -oleventlog-pipe
TeofilC commented 2 years ago

One advantage of this library over named pipes is that afaict it handles the process handling the eventlog dying much better. It will resend the eventlog header allowing a new process to re-attach whereas with the named pipe approach you have to restart the application you are monitoring or have something very clever in the listening process.