瀏覽代碼

another function for the new signal feature

Sebastian Vendt 4 年之前
父節點
當前提交
35859dd6c3
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      libA.c

+ 6 - 0
libA.c

@@ -51,4 +51,10 @@ int main(void)
 
     sleep(5);
     return 0;
+}
+
+//this also belongs to the new signal feature
+void sighandler(int signum) {
+   printf("Caught signal %d, coming out...\n", signum);
+   exit(1);
 }