Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | support: Change xgetline to return 0 on EOF | Florian Weimer | 2020-04-03 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | The advantage is that the buffer will always contain the number of characters as returned from the function, which allows one to use a sequence like /* No more audit module output. */ line_length = xgetline (&buffer, &buffer_length, fp); TEST_COMPARE_BLOB ("", 0, buffer, line_length); to check for an expected EOF, while also reporting any unexpected extra data encountered. Reviewed-by: Carlos O'Donell <carlos@redhat.com> | ||||
* | support: Add support_process_state_wait | Adhemerval Zanella | 2020-02-27 | 1 | -0/+92 |
It allows parent process to wait for child state using a polling strategy over procfs on Linux. The polling is used over ptrace to avoid the need to handle signals on the target pid and to handle some system specific limitation (such as YAMA). The polling has some limitations, such as resource consumption due the procfs read in a loop and the lack of synchronization after the state is obtained. The interface idea is to simplify some sleep synchronization waitid tests and is to reduce timeouts by replacing arbitrary waits. |