[英]why does the kill function man page shows two header sys/types.h and signal.h
man 2 kill
- C 中 kill function 的手冊頁在 SYNOPSIS 中顯示了兩個 header 文件 -
當我在我的 c 程序中使用 kill function 時, only including the signal.h file
就可以完美編譯。
包含synopsis
中提到的所有#include 重要嗎?
上面 kill 中sys/types.h
的目的是什么?
您可以包含sys/types.h
以使用pid_t
並且它是可選的。 但是signal.h
允許您使用kill
(和其他函數)、信號常量等。所以#include <signal.h>
必須使用kill
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.