getpid() - Unix、Linux 系統呼叫 - 技術教學
Tutorials Point


  Unix 入門
  Unix Shell 程式設計
  高階 Unix
  Unix 有用參考
  Unix 有用資源
  精選閱讀

版權所有 © 2014 by tutorialspoint



  主頁     參考     討論論壇     關於 TP  

getpid() - Unix、Linux 系統呼叫


previous next AddThis Social Bookmark Button

廣告

名稱

getpid,getppid - 獲取程序標識

概要

#include <sys/types.h>
#include <unistd.h>

pid_t getpid(void);
pid_t getppid(void);

描述

getpid() 返回當前程序的程序 ID。(這通常由生成唯一臨時檔名的例程使用)。

getppid() 返回當前程序的父程序 ID。

遵循

POSIX.1-2001、4.3BSD、SVr4

另請參見



previous next Printer Friendly

廣告


  

廣告