summary refs log tree commit diff stats
path: root/bsd-user/freebsd/os-proc.h
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2024-03-05 12:09:42 +0000
committerAlex Bennée <alex.bennee@linaro.org>2024-03-06 12:35:19 +0000
commit4edc98fcc8c8124a2e345144a75e1b33dac7632c (patch)
tree87c6ae410460575cf92ea62a552302488374eec9 /bsd-user/freebsd/os-proc.h
parent3d6ed98da82e0bb2384bfbc83fadb518271fdbca (diff)
downloadfocaccia-qemu-4edc98fcc8c8124a2e345144a75e1b33dac7632c.tar.gz
focaccia-qemu-4edc98fcc8c8124a2e345144a75e1b33dac7632c.zip
{linux,bsd}-user: Pass pid to fork_end()
The upcoming follow-fork-mode child support requires knowing the child
pid. Pass it down.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20240219141628.246823-6-iii@linux.ibm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240305121005.3528075-7-alex.bennee@linaro.org>
Diffstat (limited to 'bsd-user/freebsd/os-proc.h')
-rw-r--r--bsd-user/freebsd/os-proc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/bsd-user/freebsd/os-proc.h b/bsd-user/freebsd/os-proc.h
index d641878034..3003c8cb63 100644
--- a/bsd-user/freebsd/os-proc.h
+++ b/bsd-user/freebsd/os-proc.h
@@ -208,7 +208,7 @@ static inline abi_long do_freebsd_fork(void *cpu_env)
      */
     set_second_rval(cpu_env, child_flag);
 
-    fork_end(child_flag);
+    fork_end(ret);
 
     return ret;
 }
@@ -252,7 +252,7 @@ static inline abi_long do_freebsd_rfork(void *cpu_env, abi_long flags)
      * value: 0 for parent process, 1 for child process.
      */
     set_second_rval(cpu_env, child_flag);
-    fork_end(child_flag);
+    fork_end(ret);
 
     return ret;
 
@@ -285,7 +285,7 @@ static inline abi_long do_freebsd_pdfork(void *cpu_env, abi_ulong target_fdp,
      * value: 0 for parent process, 1 for child process.
      */
     set_second_rval(cpu_env, child_flag);
-    fork_end(child_flag);
+    fork_end(ret);
 
     return ret;
 }