News for hackers. Stuff that matters.
Re:IPC – Unix Signals by loeg on Monday October 09, 2023 @11:19AM (#37821341)
> A new pid is always more than the previously assigned pid during an OS uptime[1]

This is not universal. Pids can be reused in unixes. The footnote seems to be missing when I went to see if it provided this context.

> Signals are plenty fast. Cloudflare benchmarked 404,844 1KB messages per second. That can suit most performance needs.

Uh, how is Cloudflare sending 1kB messages with signals? Neither this article nor the linked Cloudflare post seem to elaborate on this.

Re:IPC – Unix Signals by jandrese on Monday October 09, 2023 @11:34AM (#37821489)
That's a good question. Maybe set up 1kb of shared memory and you notify the far process that it is ready via a signal? Seems a bit clunky.
Re:IPC – Unix Signals by loeg on Monday October 09, 2023 @11:36AM (#37821518)
Cloudflare's table has a separate row for shared memory, so, who knows.
Re:IPC – Unix Signals by Denvercoder9 on Monday October 09, 2023 @12:20PM (#37821984)
> Uh, how is Cloudflare sending 1kB messages with signals? Neither this article nor the linked Cloudflare post seem to elaborate on this.

Cloudflare links to the code they used; it doesn't actually seem to transfer any message (note that the README there also marks unix signals as broken): https://github.com/goldsborough/ipc-bench/blob/master/source...

Re:IPC – Unix Signals by toth on Monday October 09, 2023 @12:42PM (#37822241)
If you look at the link to the Cloudfare post [1], they are comparing a bunch of different IPC methods. I bet what I did is for all the other ones (shared memory, mmaped files, unix sockets, etc) they did send 1KB messages, but for signals they are just sending the signal and associated int. It's the only thing that makes sense to me.

[1] https://blog.cloudflare.com/scalable-machine-learning-at-clo...

Re:IPC – Unix Signals by generalizations on Monday October 09, 2023 @01:25PM (#37822843)
In FreeBSD at least, PIDs can also be randomized.
Re:IPC – Unix Signals by goodyduru on Monday October 09, 2023 @06:04PM (#37826049)
Author here. I've corrected the errors. Thanks!