<?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 Re: System call in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/system-call/m-p/3011692#M911441</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Its fork()&lt;BR /&gt;Have a look at the man pages of fork&lt;BR /&gt;&lt;BR /&gt;man fork&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Rajeev</description>
    <pubDate>Tue, 01 Jul 2003 03:58:05 GMT</pubDate>
    <dc:creator>Rajeev  Shukla</dc:creator>
    <dc:date>2003-07-01T03:58:05Z</dc:date>
    <item>
      <title>System call</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-call/m-p/3011691#M911440</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;What is the system call invoked when a new process needs to be created??&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Karthik</description>
      <pubDate>Tue, 01 Jul 2003 03:48:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-call/m-p/3011691#M911440</guid>
      <dc:creator>Karthik S S</dc:creator>
      <dc:date>2003-07-01T03:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: System call</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-call/m-p/3011692#M911441</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Its fork()&lt;BR /&gt;Have a look at the man pages of fork&lt;BR /&gt;&lt;BR /&gt;man fork&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Rajeev</description>
      <pubDate>Tue, 01 Jul 2003 03:58:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-call/m-p/3011692#M911441</guid>
      <dc:creator>Rajeev  Shukla</dc:creator>
      <dc:date>2003-07-01T03:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: System call</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-call/m-p/3011693#M911442</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;The man page from fork (2) explains everything.&lt;BR /&gt;"The fork() system call causes the creation of a new process.&lt;BR /&gt;&lt;BR /&gt;$ man fork&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Michael</description>
      <pubDate>Tue, 01 Jul 2003 04:02:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-call/m-p/3011693#M911442</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2003-07-01T04:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: System call</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-call/m-p/3011694#M911443</link>
      <description>/* ----------------------------------------------------------------- */&lt;BR /&gt;/* FUNCTION  child:                                                  */&lt;BR /&gt;/*    This function takes 3 arguments(identity, life_time, ground).  */&lt;BR /&gt;/* It forks a process, sleep for the life_time, the ground is used   */&lt;BR /&gt;/* to decide whether wait or no wait.                                */&lt;BR /&gt;/* The new child ps shows its detail in both beginning and end time. */&lt;BR /&gt;/* ----------------------------------------------------------------- */ &lt;BR /&gt;void  child (char *identity, int life_time, char *ground) {&lt;BR /&gt;     pid_t  pid;&lt;BR /&gt;     int    status;&lt;BR /&gt;     char   buf[50];&lt;BR /&gt;     time_t t1, t2;&lt;BR /&gt;     struct tms childtim;&lt;BR /&gt;&lt;BR /&gt;     if ((pid = fork()) &amp;lt; 0) {&lt;BR /&gt;          printf("*** ERROR: %d: forking %s process failed(Life time: %d)\n", getpid(), identity, life_time);&lt;BR /&gt;          exit(1);&lt;BR /&gt;     } &lt;BR /&gt;     else if (pid == 0) {          /* for the child process:         */&lt;BR /&gt;time(&amp;amp;t1);&lt;BR /&gt;   sprintf(buf, "\n %s process starts\n  pid     : %d\n  ppid    : %d\n  start_at: %s \n", identity, getpid(), getppid(), asctime(localtime(&amp;amp;t1))); &lt;BR /&gt;     write(1, buf, strlen(buf));&lt;BR /&gt;     sleep(life_time);&lt;BR /&gt;time(&amp;amp;t2);&lt;BR /&gt;times( &amp;amp;childtim );&lt;BR /&gt;     sprintf(buf, "\n %s process is about to exit\n  pid     : %d\n  CPU_time: %d \n  stop_at : %s \n", identity, getpid(), childtim.tms_utime, asctime(localtime(&amp;amp;t2)));&lt;BR /&gt;     write(1, buf, strlen(buf));&lt;BR /&gt;          exit(1);&lt;BR /&gt;     }&lt;BR /&gt;     else {                        &lt;BR /&gt;          if (!strcmp(ground, "f")) {&lt;BR /&gt;                while (wait(&amp;amp;status) != pid)  &lt;BR /&gt;                     ;&lt;BR /&gt;          }&lt;BR /&gt;     }&lt;BR /&gt;}</description>
      <pubDate>Tue, 01 Jul 2003 04:16:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-call/m-p/3011694#M911443</guid>
      <dc:creator>twang</dc:creator>
      <dc:date>2003-07-01T04:16:21Z</dc:date>
    </item>
  </channel>
</rss>

