You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported by @angrave:
Odd non-compliant behavior in the linux-in-the-browser.
The program should ignore CTRL-C while the handler-function is running because sa_mask was filled.
#include<stdio.h>#include<unistd.h>#include<signal.h>#include<string.h>voidhandlerFunction()
{
write(1,"CTRL-C",6); /* When you see this press CTRL C*/while(1) {}
}
intmain()
{
structsigactionsa;
memset(&sa, 0 , sizeof(sa));
sa.sa_handler=handlerFunction;
sa.sa_flags=SA_RESTART;
sigfillset(&sa.sa_mask);
sigaction(SIGALRM, &sa, NULL);
alarm(1);
printf("Sleeping..zzzz...\n");
sleep(2);
while(1) {}
return0;
}
The text was updated successfully, but these errors were encountered:
Reported by @angrave:
Odd non-compliant behavior in the linux-in-the-browser.
The program should ignore
CTRL-C
while the handler-function is running becausesa_mask
was filled.The text was updated successfully, but these errors were encountered: