Skip to content

Tag: asynchronous

Linux synchronization without polling

In principle what I want is very simple. Two executables ./read and ./write respectively read and write from a resource (let’s say a file). Using flock(2) it is easy to prevent race conditions between arbitrary invocations of ./read and ./write at arbitrary times. The requirement is that each invocation…

Linux non-blocking sockets

Hello I want to implement non-blocking TCP sockets with an openSSL overlay. For now I use epoll, but isn’t there another methode (except poll or select)? Is it possible to associate a callback function to a descriptor? I read something about libaio, but I don’t know exactly what it can do… A…

C non-blocking keyboard input

I’m trying to write a program in C (on Linux) that loops until the user presses a key, but shouldn’t require a keypress to continue each loop. Is there a simple way to do this? I figure I could possibly do it with select() but that seems like a lot of work. Alternatively, is there a way to catch a