Ok, so I was putting in prints to investigate where my program stopped executing, it seems I simply cannot print to stdout after a certain code line, that code line being
printf(") : %d\n", PORTNUMBER);
Some examples:
printf("test1");
printf(") : %d\n", PORTNUMBER);
printf("test2");
Prints test1 and the portnumber, but does not print test2.
This:
printf(") : %d\n", PORTNUMBER);
fprintf(stdout, "test2");
Prints the portnumber, but does not print test2.
This:
printf(") : %d\n", PORTNUMBER);
fprintf(stderr, "test2");
Prints both the port number and test2.
So my question is, what's going on here, what could be making me unable to write to stdout after the port number print?