|
|
|
|
|
by alex-wallish
1999 days ago
|
|
How are you handling timeouts and forks? The following to snippets have different results: #include <stdio.h>
int main() {
while(1){
fork();
}
return 1;
} #include <stdio.h>
int main() {
while(1){
}
return 1;
} The second snippet times out properly, but the first does not. |
|
The first snippet is a fork bomb and will cause the container to run out of memory before the timeout. It does terminate since I have set a 256M memory limit. However, it is not sending the correct response in this case and the message in the output tab is not updated properly.
Fork works just fine, https://sharepad.io/p/aBn5Oxu