online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include<stdio.h> #include<signal.h> #include<string.h> #include <unistd.h> int f; void sig_han(int signo) { printf("the sighandler :%d \n",signo); printf("the pid :%d\n",getpid()); f = 1; } int main() { struct sigaction act; memset(&act,0,sizeof(act)); act.sa_handler = sig_han; sigaction(2,&act,NULL); while(1) { if(f == 1) break; printf("test\n"); sleep(1); } return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue