1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

support: Add support_process_state_wait

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.
This commit is contained in:
Adhemerval Zanella
2019-11-19 17:17:05 -03:00
parent 5c8aa3849a
commit dfe9aa9156
6 changed files with 278 additions and 0 deletions

View File

@@ -27,6 +27,8 @@ __BEGIN_DECLS
FILE *xfopen (const char *path, const char *mode);
void xfclose (FILE *);
ssize_t xgetline (char **lineptr, size_t *n, FILE *stream);
__END_DECLS
#endif /* SUPPORT_XSTDIO_H */