Complete code for parallel computing p(n) mod 2. Features: 1) Load result from existing.txt; 2) Write increment output 1000 digits per line; 3) SIGINT stops calculation and writes to file; 4) SIGTTOU reports progress.