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
alarm() creates thread which wll send a signal, but fork() in multi-threaded process copy only thread from which was invoked, so alarm thread will not be present in that new process causing no arrival of alarm signal.
In above reproduction handler is invoked once, but should be twice.
Furtermore as POSIX states: If there is a previous alarm() request with time remaining, alarm() shall return a non-zero value that is the number of seconds until the previous request would have generated a SIGALRM signal. Otherwise, alarm() shall return 0.
alarm()
creates thread which wll send a signal, butfork()
in multi-threaded process copy only thread from which was invoked, so alarm thread will not be present in that new process causing no arrival of alarm signal.Reproduciton (ia32-generic-qemu):
In above reproduction handler is invoked once, but should be twice.
Furtermore as
POSIX
states:If there is a previous alarm() request with time remaining, alarm() shall return a non-zero value that is the number of seconds until the previous request would have generated a SIGALRM signal. Otherwise, alarm() shall return 0.
Reproduction (ia32-generic-qemu):
The return value should be
1
.The text was updated successfully, but these errors were encountered: