+ pid_t pid;
+
+ pid = rfork(RFPROC | RFTHREAD);
+ if (pid == 0) {
+ /* child */
+ int ret;
+
+ ret = fn(arg);
+ exit(ret);
+ } else if (pid > 0) {
+ /* parent */
+ /*
+ * Just return, the caller will wait for the child.
+ */
+ return pid;
+ } else {
+ /* Error */
+ return pid;
+ }