]> granicus.if.org Git - strace/commitdiff
2003-02-19 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Thu, 20 Feb 2003 02:45:22 +0000 (02:45 +0000)
committerRoland McGrath <roland@redhat.com>
Thu, 20 Feb 2003 02:45:22 +0000 (02:45 +0000)
FreeBSD rfork support changes from Russ Cox <rsc@plan9.bell-labs.com>:
* syscall.c (internal_syscall): Handle SYS_rfork with internal_fork.
* process.c (internal_fork) [SYS_rfork]: Bail if RFPROC flag not set.

process.c
syscall.c

index c24bfc665d1013b8c9e09583278805c22fbdff58..30d1545b276c9ce48c6a0efc9e27eb5d1a2a77b2 100644 (file)
--- a/process.c
+++ b/process.c
@@ -451,6 +451,10 @@ struct tcb *tcp;
        struct tcb *tcpchild;
 
        if (exiting(tcp)) {
+#ifdef SYS_rfork
+               if (tcp->scno == SYS_rfork && !(tcp->u_arg[0]&RFPROC))
+                       return 0;
+#endif
                if (getrval2(tcp))
                        return 0;
                if (!followfork)
index 5b04dc913610f67c125591797bd7b68ed8e03c48..bb118693a94cb3362b79ae00371dca279b053d75 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -621,6 +621,9 @@ struct tcb *tcp;
 #endif
 #ifdef SYS_rforkall
        case SYS_rforkall:
+#endif
+#ifdef SYS_rfork
+       case SYS_rfork:
 #endif
                internal_fork(tcp);
                break;