c - C中pid_t和int的区别

标签 c types process

<分区>

获取进程id时pid_t数据类型和int数据类型有什么区别? 我看到了类似的东西:

pid_t getpid(void);

但是它和

有什么区别
int getpid(void);

最佳答案

引自libc manual :

The pid_t data type is a signed integer type which is capable of representing a process ID. In the GNU C Library, this is an int.

关于c - C中pid_t和int的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53256436/

相关文章:

multithreading - 进程和线程有什么区别?

c - 3求和算法来求方程

c - C 中简单的 icmp traceroute 实现

grails - 在grails中传递 boolean 值而不是 boolean 值

linux - 当一个进程被杀死时,这些信息会记录在任何地方吗?

c - Linux中限制进程读取 "/etc/resolv.conf"文件

c - 使用指针迭代字符串

c - FFT无法重新组合结果?

types - OCAML 将定义的类型与定义混淆了吗?

haskell - 生成范围标准时类型不匹配