Using SCTP in GLib

A while ago, I wrote about using a UDP socket as event source in GLib. Now, I’m migrating my program to SCTP. The main reason is that SCTP provides reliability for sequential messages, but some of the advanced features might become useful later. Surprisingly few changes were necessary in my program: Create the socket withContinue reading “Using SCTP in GLib”

Catch SIGTERM, exit gracefully

I knew that programs can catch a SIGTERM and exit gracefully. What I didn’t know is how to do that, and that it’s actually quite simple. You need just two things: A function that will cause your program to exit gracefully The sigaction() function and the struct of the same name, defined in the systemContinue reading “Catch SIGTERM, exit gracefully”

Design a site like this with WordPress.com
Get started