| 1 | #include <stdio.h> |
|---|---|
| 2 | #include <fcntl.h> |
| 3 | |
| 4 | #include <chrono> |
| 5 | #include <fstream> |
| 6 | #include <thread> |
| 7 | |
| 8 | extern void dont_strip_me() |
| 9 | { |
| 10 | printf(format: "I wasn't stripped\n"); |
| 11 | } |
| 12 | |
| 13 | static void *a_function() |
| 14 | { |
| 15 | while (1) |
| 16 | { |
| 17 | std::this_thread::sleep_for(rtime: std::chrono::microseconds(100)); |
| 18 | dont_strip_me(); |
| 19 | } |
| 20 | return 0; |
| 21 | } |
| 22 | |
| 23 | int main(int argc, char const *argv[]) |
| 24 | { |
| 25 | { |
| 26 | // Create file to signal that this process has started up. |
| 27 | std::ofstream f; |
| 28 | f.open(s: argv[1]); |
| 29 | } |
| 30 | a_function(); |
| 31 | return 0; |
| 32 | } |
| 33 |
