--- linuxsampler/trunk/src/linuxsampler.cpp 2005/12/22 19:28:36 815 +++ linuxsampler/trunk/src/linuxsampler.cpp 2005/12/22 19:29:52 816 @@ -38,6 +38,7 @@ Sampler* pSampler = NULL; LSCPServer* pLSCPServer = NULL; pthread_t main_thread; +pid_t main_pid; bool bPrintStatistics = false; bool profile = false; bool tune = true; @@ -53,8 +54,11 @@ // initialize the stack trace mechanism with our binary file StackTraceInit(argv[0], -1); + main_pid = getpid(); main_thread = pthread_self(); + + // setting signal handler for catching SIGINT (thus e.g. ) signal(SIGINT, signal_handler); @@ -219,7 +223,7 @@ } void kill_app() { - kill(main_thread, SIGKILL); + kill(main_pid, SIGKILL); } void parse_options(int argc, char **argv) {