Good afternoon, please tell me how to display the PID of the process being started in a program written in C ++. OS - Linux
I correctly understood that the process should withdraw its PID? If so, then:
#include <sys/types.h> #include <unistd.h> #include <iostream> int main() { std::cout << getpid() << std::endl; return 0; }
Source: https://ru.stackoverflow.com/questions/11446/More articles:Work with EXIF in iOS applicationsAssembler amountAnnotations in Java are slower than XML configuration files?Position background-image for reference in IE 6-7How to stretch Panel in Ext JS by 100% in width?Asynchronously on sockets download several html pagesPython code converter to C or C ++ code [closed]Own webpageAmount of data in the channelHow on iPhone to check the speed of the WiFi connection?All Articles