Skip to content

Tag: concurrency

how to output only when command finish

I’m running multiple commands using &: This doesn’t work well because the output lines are interleaved. I want each curl to hold its output, until it’s done. How to do that? I understand I can use temp files, concat together and delete afterwards. Are there better ways? Answer You could …

Safe global state for signal handling

I am toying around with Rust and various UNIX libraries. A use-case that I have right now is that I want to react to POSIX signals. To keep things reasonable I want to create an abstraction over the signal handling so that the rest of my program doesn’t have to worry about them as much. Let’s call…