[go: up one dir, main page]

File: slow-exit.c

package info (click to toggle)
fatrace 0.19.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 216 kB
  • sloc: ansic: 710; python: 528; sh: 36; makefile: 26
file content (12 lines) | stat: -rw-r--r-- 257 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
/*
 * LD_PRELOAD library to slow down program exits
 * This gives fatrace enough time to read process metadata from /proc
 */

#define _GNU_SOURCE
#include <unistd.h>

__attribute__((destructor))
static void slow_exit_cleanup(void) {
    usleep (100000);
}