我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

getmypid()和posix_getpid()之间的区别

What's the difference between the getmypid() and the posix_getpid() functions?

I turned to getmypid() because my script has to run both on Windows and on Linux.

It seems the main difference is what you said :

  • getmypid works both on windows and linux
  • posix_getpid does not work on windows, as stated here

I guess the second one exists to be kinda POSIX-compliant (if there are others POSIX functions, why not this one ? )

So, if you want your code to be portable, you'll use the first one -- as you did.

近期文章

  • ini_precision没有输出正确的数字
  • 为什么RedBean没有使用多个表名?
  • 从QuickBooks导入客户(PHP WebKit)
  • 使用Twilio获取短信发送者的电话号码
  • 如何在WordPress Post文件中编辑php代码?
  • 通过雄辩的查询在多个表中搜索
  • 使用ajax来防止页面上的闪存
  • 2个操作使用的CodeIgniter活动记录
  • 推进joomla自定义组件的url sef
  • PHP - 添加到多维数组的值
  • 使用functions.php,我的网站变得空白
  • 无法将mysql时间戳映射到elasticsearch
  • 嵌套div中的表单文本字段不可单击
  • 在Laravel中从同一网页发布两个表单
  • Laravel 5单元测试中未发现特征
  • 将html实体转换为字符问题
  • 从simplexmlelement对象获取值
  • 仍然得到500内部服务器错误appserv
  • 如何基于传递的变量发布数据
  • Framework / Zend中的代码是否被认为是插件?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华