message: add signal handler to terminate thread
diff: @@ -1046,12 +1046,19 @@ static void* uhyve_thread(void* arg)
  return (void*) ret;
  }
  +void sigterm_handler(int signum)
  +{
  + pthread_exit(0);
  +}
  +
  int uhyve_init(char *path)
  {
  char* v = getenv("HERMIT_VERBOSE");
  if (v && (strcmp(v, "0") != 0))
  verbose = true;
  + signal(SIGTERM, sigterm_handler);
  +
  // register routine to close the VM
  atexit(uhyve_atexit);
  