made configure determine the mapping from os signals to scsh interrupts
This commit is contained in:
parent
812bc338c3
commit
c51640a971
|
@ -0,0 +1,31 @@
|
||||||
|
#include "scsh_aux.h"
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
|
int main(int argc, char* argv[]){
|
||||||
|
int signr = atoi(argv[1]);
|
||||||
|
|
||||||
|
switch (signr) {
|
||||||
|
case SIGHUP : printf("scshint_hup"); break;
|
||||||
|
case SIGINT : printf("scshint_keyboard"); break;
|
||||||
|
case SIGQUIT : printf("scshint_quit"); break;
|
||||||
|
case SIGUSR1 : printf("scshint_usr1"); break;
|
||||||
|
case SIGUSR2 : printf("scshint_usr2"); break;
|
||||||
|
case SIGALRM : printf("scshint_alarm"); break;
|
||||||
|
case SIGTERM : printf("scshint_term"); break;
|
||||||
|
case SIGCHLD : printf("scshint_chld"); break;
|
||||||
|
case SIGCONT : printf("scshint_cont"); break;
|
||||||
|
case SIGTSTP : printf("scshint_tstp"); break;
|
||||||
|
case SIGURG : printf("scshint_urg"); break;
|
||||||
|
case SIGXCPU : printf("scshint_xcpu"); break;
|
||||||
|
case SIGXFSZ : printf("scshint_xfsz"); break;
|
||||||
|
case SIGVTALRM : printf("scshint_vtalrm"); break;
|
||||||
|
case SIGPROF : printf("scshint_prof"); break;
|
||||||
|
case SIGWINCH : printf("scshint_winch"); break;
|
||||||
|
case SIGIO : printf("scshint_io"); break;/* aka SIGPOLL*/
|
||||||
|
case SIGPWR : printf("scshint_pwr"); break;
|
||||||
|
default: printf("-1");}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue