News for hackers. Stuff that matters.
Re:Parallel – A command-line CPU load balancer written in Rust by the_mitsuhiko on Friday August 26, 2016 @03:07PM (#12368529)
> This is false, you can call any async signal safe function. Incidentally write is one of them.

Which malloc() is not. Anything that might internally allocate is out of the question. The list of functions that are safe to call in C alone is very limited and even then the question of errno arises.

Re:Parallel – A command-line CPU load balancer written in Rust by gpderetta on Friday August 26, 2016 @05:52PM (#12369562)
why are you bringing up malloc?
Re:Parallel – A command-line CPU load balancer written in Rust by the_mitsuhiko on Friday August 26, 2016 @06:56PM (#12369885)
Because you do not necessarily know which call will allocate memory in Rust and even in C it can be tricky. You literally can only go with the whitelisted functions.
Re:Parallel – A command-line CPU load balancer written in Rust by gpderetta on Saturday August 27, 2016 @11:14AM (#12372678)
Yes, that's way you should, as I suggested, only call functions explicitly documented as asyc-signal-safe.