initial commit
[pfinal.git] / Routix / tareas / ush / my_trap.c
blob00c4c1a3fcddc1b6e821c1a388694ecfb983c17c
1 #include <signal.h>
2 char cmd[100];
4 main(int argc, char *argv[])
6 void sighandler();
7 int i, offset = 0;
9 signal(SIGQUIT, sighandler);
10 for (i = 1; i < argc; i++) {
11 strcpy(cmd + offset, argv[i]);
12 offset += strlen(argv[i]);
13 cmd[offset++] = ' ';
15 cmd[offset] = '\0';
16 pause();
19 void sighandler()
21 system(cmd);