<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Next PID in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/next-pid/m-p/2580642#M31764</link>
    <description>How does Unix determine the PID for a new process? &lt;BR /&gt;I have an application that uses the PID as part of a log file name. The application processes output files and runs many times during a day and each run is a new process. It appears that it comes up with the same PID, sometimes within a day or two, and end up with the output of two runs combined in one log file. I would have thought that with a maximum PID of 65k, it would take much longer than that to come around to the same PID.&lt;BR /&gt;&lt;BR /&gt;Jim&lt;BR /&gt;</description>
    <pubDate>Mon, 17 Sep 2001 17:46:13 GMT</pubDate>
    <dc:creator>Jim McKee</dc:creator>
    <dc:date>2001-09-17T17:46:13Z</dc:date>
    <item>
      <title>Next PID</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/next-pid/m-p/2580642#M31764</link>
      <description>How does Unix determine the PID for a new process? &lt;BR /&gt;I have an application that uses the PID as part of a log file name. The application processes output files and runs many times during a day and each run is a new process. It appears that it comes up with the same PID, sometimes within a day or two, and end up with the output of two runs combined in one log file. I would have thought that with a maximum PID of 65k, it would take much longer than that to come around to the same PID.&lt;BR /&gt;&lt;BR /&gt;Jim&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Sep 2001 17:46:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/next-pid/m-p/2580642#M31764</guid>
      <dc:creator>Jim McKee</dc:creator>
      <dc:date>2001-09-17T17:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Next PID</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/next-pid/m-p/2580643#M31765</link>
      <description>Hi Jim,&lt;BR /&gt;&lt;BR /&gt;You are essentailly correct; PID's count up to 65535 and then recycle though low numbers (e.g. 1) are skipped and a test is done to see if the PID is in use. However, your filename creation may not be directly related to the PID value. It may simply test to see if such a file exists (e.g. the processes last temp file name) and use it if available. It is also possible that your are spawning many, many processes so that PID collision within a day or so is not unlikely.&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Sep 2001 18:05:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/next-pid/m-p/2580643#M31765</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-09-17T18:05:13Z</dc:date>
    </item>
  </channel>
</rss>

