This question already has an answer here:
If I run these commands:
dmesg | head -n 10
I presume the OS sends back some kind of signal to
head has read 10 lines. How does this work? What does
head tell the kernel?
This is different from a program dying since this is a normal, 'clean' stop.