Fresh IDE . Artifact [3ef5229955]
Not logged in

This repository is a mirror!

The original is located on: https://fresh.flatassembler.net/fossil/repo/fresh
If you want to follow the project, please update your remote-url

Artifact 3ef52299553297e5e21c402e26dba50964a8734f:


 
<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title><style type="text/css">
<!--
.style1 {font-size: 18px;font-weight: bold;font-family: Georgia, "Times New Roman", Times, serif;}
.style2 {font-size: 14px}
a{color:#0000cc;text-decoration:none}
a:visited{color:#0000cc;text-decoration:none}
-->
</style></head>
<body style="margin:0px 0px 0px 0px;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#cccccc"><span class="style1" style="margin-left:5px">sys_fork &nbsp;<span class="style2">[kernel/process.c] </span></span></td>
  </tr>
  <tr>
    <td><p style="margin-left:22px;margin-top:0px"><br />
      Creates a child process that differs from the parent process only in its PID and   PPID, and in the fact that resource utilizations are set to 0. File locks and   pending signals are not inherited. </p>
      <p style="margin-left:10px"><strong>Arguments</strong></p>
      <table width="100%" border="0" style="margin-left:20px; margin-right:20px">
        <tr>
          <td width="6%" valign="top"><em>eax</em></td>
          <td width="94%">2</td>
        </tr>
      </table>
      <p style="margin-left:10px" ><strong>Return values</strong></p>
      <p style="margin-left:22px;margin-right:10px" >If the system call succeeds the return value within the parent thread of execution is  PID of the child process and within the child thread of execution is 0. <br />
      If the system call fails the return value is one of the following  <em>errno</em> values: </p>
      <table width="100%" border="0" style="border:dashed;border-bottom-width:1px;border-left-width:1px;border-right-width:1px;border-top-width:1px;border-color:#333333;margin-left:22px;margin-right:22px">
        <tr>
          <td><table width="100%" border="0">
              <tr>
                <td width="10%" valign="top"><code>-EAGAIN </code></td>
                <td width="90%"><code>Cannot allocate sufficient memory to copy the parent's page tables and allocate   a task structure for the child. <br>
                -or- <br>
                It was not possible to create a new process because the caller's RLIMIT_NPROC resource limit was encountered. To exceed this limit, the   process must have either the CAP_SYS_ADMIN or the CAP_SYS_RESOURCE capability. </code></td>
              </tr>
              <tr>
                <td valign="top"><code>-ENOMEM</code></td>
                <td><code>Failed to allocate the necessary kernel structures because due to memory limit.</code></td>
              </tr>

          </table></td>
        </tr>
      </table>
      <p style="margin-left:10px"><strong>Remarks</strong></p>
      <p style="margin-left:22px">All register values are passed to the child process. <br>
        <br>
      See /samples/basic/fork.asm for an example. </p>
      <p style="margin-left:10px"><strong>Compatibility</strong></p>
      <p style="margin-left:22px">n/a</p></td>
  </tr>
</table></body></html>