aboutsummaryrefslogtreecommitdiff
path: root/paludis/util/process_TEST.cc
AgeCommit message (Collapse)AuthorLines
2018-06-13process.cc: don't allocate after forkAvatar Johannes Nixdorf -0/+18
In multithreaded processes POSIX specifies that after fork only AS-safe functions may be called. [1] This fixes a race condition I observed in "cave generate-metadata" with musl libc. This does happen regularily with musl libc, but the general problem also affects glibc. (test [2] if you don't believe me - with glibc it happens more rarely and causes a deadlock inside of malloc locks instead of a crash). This does not fix these problems for as_main_process, as there never will be an exec in the child process that way, which makes it impossible to do safely this way. [1]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fork.html [2]: https://shadowice.org/~mixi/examples/never-fork-and-malloc-in-multiple-threads.c
2015-05-02Make stream conversions explicit for gtestAvatar Wouter van Kesteren -2/+2
Change-Id: I74b0915cdfb11ff6f42151ba5ac2452b8e9a4052
2011-03-20gtest moreAvatar Ciaran McCreesh -347/+226
2010-12-10Do our own buffering for SafeOFStreamAvatar Ciaran McCreesh -1/+1
2010-10-16Don't assume sh is anything usefulAvatar Ciaran McCreesh -9/+9
2010-08-24FSEntry -> FSPath, FSStatAvatar Ciaran McCreesh -2/+2
Fixes: ticket:967
2010-08-21Process::send_input_to_fdAvatar Ciaran McCreesh -0/+36
2010-08-21ProcessCommand(string)Avatar Ciaran McCreesh -0/+15
2010-08-21Process::clearenvAvatar Ciaran McCreesh -0/+17
2010-08-21Process::prefix_std{out,err}Avatar Ciaran McCreesh -0/+32
2010-08-21Process::pipe_command_handlerAvatar Ciaran McCreesh -0/+56
2010-08-21Process::set_stdin_fdAvatar Ciaran McCreesh -0/+31
2010-08-21Process::capture_output_to_fdAvatar Ciaran McCreesh -0/+30
2010-08-21Process::setuid_setgidAvatar Ciaran McCreesh -1/+25
2010-08-21Process::use_ptysAvatar Ciaran McCreesh -0/+30
2010-08-21Process::chdirAvatar Ciaran McCreesh -0/+17
2010-08-21Process::setenvAvatar Ciaran McCreesh -0/+16
2010-08-21New, less horrible way of running processesAvatar Ciaran McCreesh -0/+149