pause.c: Document intended PID 1 behavior

This commit is contained in:
Lee Verberne 2016-12-22 21:51:10 +00:00
parent 7910a3f315
commit c706a052ef

View File

@ -33,6 +33,7 @@ static void sigreap(int signo) {
int main() {
if (getpid() != 1)
/* Not an error because pause sees use outside of infra containers. */
fprintf(stderr, "Warning: pause should be the first process in a pod\n");
if (sigaction(SIGINT, &(struct sigaction){.sa_handler = sigdown}, NULL) < 0)