The Self-Pipe Trick Explained
sitepoint.com
sitepoint.com
(The almost is processes; Capsicum which is in FreeBSD and being ported to Linux lets you get a file descriptor for a process via pdfork(2) which you can poll too. Normally this doesnt matter as you can wait on the SIGCHLD anyway, but you can pass non child process file descriptors via unix sockets allowing waiting on other processes too).
1. array[size] = element
2. size = size + 1
then we could get: 1. array[size] = element (first signal handler is run)
2. array[size] = element (second signal handler is run)
3. size = size + 1
4. size = size + 1
and the array is corruptedCould you elaborate on this? Even though, I tend to like Unix I thought that WaitForMultipleObjects was a better solution here.