Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
The most bug prone part of frida (in our usage) seems to be process detatching. Previously the script would detatch and then persist all coverage data once detatching had succeeded. This of course means that if detatching fails or hangs, all collected coverage is lost. This is Not Good. This commit adds a SIGINT handler which persists the existing coverage before calling `_exit(1)`. While this doesn't seem to be an especially quick operation, it does save the coverage before exiting. This commit does not address Windows usage, or processes exiting in ways other than SIGINT.