News for hackers. Stuff that matters.
Re:In C, how do you know if the dynamic allocation succeeded? by tsimionescu on Saturday November 06, 2021 @01:12AM (#29127702)
For a single-threaded process, sure. But in a multi threaded context, almost any operation done in the child after fork() can royally mess up the system. There are many versions of libcs where malloc() after fork() is likely to deadlock between the parent and child processes, as they share the internal malloc() locks.
Re:In C, how do you know if the dynamic allocation succeeded? by marcan_42 on Saturday November 06, 2021 @10:31PM (#29136001)
Ah, yes, multithreading. That always interacts poorly with old UNIX APIs...