Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Every process can get its own pid with the <a href="http://man7.org/linux/man-pages/man2/getpid.2.html" rel="nofollow">getpid(2)</a> syscall. At process creation by <a href="http://man7.org/linux/man-pages/man2/fork.2.html" rel="nofollow">fork(2)</a> the parent process (e.g. some shell) gets the pid of the new child process. Read e.g. <a href="http://advancedlinuxprogramming.com/" rel="nofollow">Advanced Linux Programming</a> for more. And the kernel (not the program) is creating some subdirectory <code>/proc/1234/</code> see <a href="http://man7.org/linux/man-pages/man5/proc.5.html" rel="nofollow">proc(5)</a> as soon as it creates the process of pid 1234.</p> <p>Actually, <code>/proc/</code> is not a real file system. It is just a pseudo file system giving a view on the state of the kernel and the entire Linux system.</p> <p>Perl gives you its <a href="http://perldoc.perl.org/POSIX.html" rel="nofollow">POSIX</a> module to interface the syscalls. The <code>getpid()</code> syscall is interfaced using the <a href="http://perldoc.perl.org/perlvar.html#%24PID" rel="nofollow">$PID</a> or <code>$$</code> Perl variable. </p> <p>The <code>/proc/</code> pseudo filesystem is filled by the kernel. You could perhaps use <a href="http://en.wikipedia.org/wiki/Inotify" rel="nofollow">inotify</a> to follow change in <code>/proc/</code> but this is very probably a bad idea.</p> <p><sup>Your question is not clear, we cannot understand what you really want to do and what you have tried.</sup></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload