I have the following c code:
void handler(int n) {
printf("n value: %i\n");
}
int main() {
signal(SIGTSTP, handler); // ^Z at keyboard
for(int n = 0; ; n++) {
}
}
I am curious what the n parameter is in the handler function. When you press ^Z
it usually prints either: 8320
, -1877932264
or -1073743664
. What are these numbers?
Edit: Ops I wrote my printf wrong. I corrected it to be:
void handler(int n) {
printf("n value: %i\n",n);
}
Now the value of n is always: 18. What is this 18?