]> granicus.if.org Git - strace/commitdiff
Handle fork1/forkall on uw, handle rfork1,rforkall,rexecve and ssisys on uw non-stop...
authorJohn Hughes <john@Calva.COM>
Wed, 18 Apr 2001 15:11:51 +0000 (15:11 +0000)
committerJohn Hughes <john@Calva.COM>
Wed, 18 Apr 2001 15:11:51 +0000 (15:11 +0000)
ChangeLog
configure.in
process.c
svr4/dummy.h
svr4/syscall.h
syscall.c
system.c

index 19083786420b5a2c5775e4748090ee304fc60a6d..2d44a465120c148badd4db642b067ab68a68dde6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2001-04-18  John Hughes <john@Calva.COM>
+
+  * configure.in: test for sys/nscsys.h, the non-stop clusters includes.
+  * process.c: handle rfork{1,all} and rexecve calls on non-stop clusters.
+  * syscall.c: treat rfork{1,all} and fork{1,all} as fork like calls.
+    Treat rexecve as an exec.
+  * system.c: decode arguments to ssisys call on nsc systems.
+  * svr4/dummy.h, svr4/syscall.h: now we handle rfork{1,all}, ssisys and
+    rexecve calls.
+
 2001-04-12  Wichert Akkerman <wakkerma@debian.org>
 
   * process.c: fix cast for powerpc code
index d5cfcf069e5743df63ad6bbed7b4e0f7f05acca2..1e8d2d8b1f126aac5e859403a0783846d716de45 100644 (file)
@@ -163,7 +163,7 @@ if test x$OPSYS != xLINUX; then
 AC_CHECK_LIB(nsl, main)
 fi
 AC_CHECK_FUNCS(sigaction strerror strsignal pread sys_siglist _sys_siglist getdents mctl putpmsg prctl sendmsg inet_ntop if_indextoname)
-AC_CHECK_HEADERS(sys/reg.h sys/filio.h sys/acl.h sys/asynch.h sys/door.h stropts.h sys/conf.h sys/stream.h sys/tihdr.h sys/tiuser.h sys/sysconfig.h asm/sigcontext.h ioctls.h sys/ioctl.h sys/ptrace.h termio.h linux/ptrace.h asm/reg.h linux/icmp.h linux/in6.h sys/uio.h sys/aio.h linux/netlink.h linux/if_packet.h poll.h sys/poll.h sys/vfs.h netinet/tcp.h netinet/udp.h asm/sysmips.h linux/utsname.h)
+AC_CHECK_HEADERS(sys/reg.h sys/filio.h sys/acl.h sys/asynch.h sys/door.h stropts.h sys/conf.h sys/stream.h sys/tihdr.h sys/tiuser.h sys/sysconfig.h asm/sigcontext.h ioctls.h sys/ioctl.h sys/ptrace.h termio.h linux/ptrace.h asm/reg.h linux/icmp.h linux/in6.h sys/uio.h sys/aio.h linux/netlink.h linux/if_packet.h poll.h sys/poll.h sys/vfs.h netinet/tcp.h netinet/udp.h asm/sysmips.h linux/utsname.h sys/nscsys.h)
 AC_DECL_SYS_ERRLIST
 AC_DECL_SYS_SIGLIST
 AC_DECL__SYS_SIGLIST
index 13dd69a1f968fa0dfe59885e83f34d92568c6f19..76d0deb7b57cfe73b83e1646b3e9a0c58d4e5772 100644 (file)
--- a/process.c
+++ b/process.c
@@ -366,6 +366,26 @@ struct tcb *tcp;
        return 0;
 }
 
+#if UNIXWARE > 2
+
+int
+sys_rfork(tcp)
+struct tcb *tcp;
+{
+       if (entering(tcp)) {
+               tprintf ("%ld", tcp->u_arg[0]);
+       }
+       else {
+               if (getrval2(tcp)) {
+                       tcp->auxstr = "child process";
+                       return RVAL_UDECIMAL | RVAL_STR;
+               }
+       }
+       return 0;
+}
+
+#endif
+
 int
 internal_fork(tcp)
 struct tcb *tcp;
@@ -1185,6 +1205,20 @@ struct tcb *tcp;
        return 0;
 }
 
+#if UNIXWARE > 2
+
+int sys_rexecve(tcp)
+struct tcb *tcp;
+{
+       if (entering (tcp)) {
+               sys_execve (tcp);
+               tprintf (", %ld", tcp->u_arg[3]);
+       }
+       return 0;
+}
+
+#endif
+
 int
 internal_exec(tcp)
 struct tcb *tcp;
index 616e86ae25437c2b03f7d0e7059d2e41e18145f0..011d547f280689e8884b3ea5c5aa466dd64db389 100644 (file)
 #define sys_xsetsockaddr printargs
 #define sys_dshmsys printargs
 #define sys_invlpg printargs
-#define sys_rfork1 printargs
-#define sys_rforkall printargs
-#define sys_rexecve printargs
 #define sys_migrate printargs
 #define sys_kill3 printargs
-#define sys_ssisys printargs
 #define sys_xbindresvport printargs
 #define sys_lwp_sema_trywait printargs
 #define sys_tsolsys printargs
 #define sys_sleep sys_alarm
 #define sys_fork1 sys_fork
 #define sys_forkall sys_fork
+#if UNIXWARE > 2
+#define sys_rfork1 sys_rfork
+#define sys_rforkall sys_rfork
+#ifndef HAVE_SYS_NSCSYS_H
+#define sys_ssisys printargs
+#endif
+#endif
 
 /* aio */
 #define sys_aionotify printargs
index 21cf8d314f7198641620661d81fb07ebd2b110f0..22b55f12a37f0492a699de3a137f187b98c8a134 100644 (file)
@@ -326,6 +326,9 @@ extern int sys_xsetsockaddr ();
 extern int sys_xgetsockopt ();
 extern int sys_xsetsockopt ();
 extern int sys_xshutdown ();
+extern int sys_rfork ();
+extern int sys_ssisys ();
+extern int sys_rexecve ();
 #endif
 #endif /* !MIPS */
 
index 39cc026020bc7730d8cc7a25146ea94303440b8e..be988dfd25811bfb96eabc039fb69fd4abc5cb1d 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -577,6 +577,18 @@ struct tcb *tcp;
 #endif
 #ifdef SYS_vfork
        case SYS_vfork:
+#endif
+#ifdef SYS_fork1
+       case SYS_fork1:
+#endif
+#ifdef SYS_forkall
+       case SYS_forkall:
+#endif
+#ifdef SYS_rfork1
+       case SYS_rfork1:
+#endif
+#ifdef SYS_rforkall
+       case SYS_rforkall:
 #endif
                internal_fork(tcp);
                break;
@@ -590,6 +602,9 @@ struct tcb *tcp;
 #endif
 #ifdef SYS_execve
        case SYS_execve:
+#endif
+#ifdef SYS_rexecve
+       case SYS_rexecve:
 #endif
                internal_exec(tcp);
                break;
@@ -879,6 +894,18 @@ struct tcb *tcp;
 #ifdef SYS_vfork
                            || scno == SYS_vfork
 #endif /* SYS_vfork */
+#ifdef SYS_fork1
+                           || scno == SYS_fork1
+#endif /* SYS_fork1 */
+#ifdef SYS_forkall
+                           || scno == SYS_forkall
+#endif /* SYS_forkall */
+#ifdef SYS_rfork1
+                           || scno == SYS_rfork1
+#endif /* SYS_fork1 */
+#ifdef SYS_rforkall
+                           || scno == SYS_rforkall
+#endif /* SYS_rforkall */
                            ) {
                                /* We are returning in the child, fake it. */
                                tcp->status.PR_WHY = PR_SYSENTRY;
index d1ee494de7b2f3602781deb5950ea9334da1106a..da0aa144aab82aa09caf1cc5e5948e96ddd59c8f 100644 (file)
--- a/system.c
+++ b/system.c
@@ -2008,6 +2008,95 @@ struct tcb *tcp;
        return 0;
 }
 
+#ifdef HAVE_SYS_NSCSYS_H
+
+#include <sys/nscsys.h>
+
+static struct xlat ssi_cmd [] = {
+       { SSISYS_BADOP, "SSISYS_BADOP"  },
+       { SSISYS_LDLVL_INIT,"SSISYS_LDLVL_INIT"},
+       { SSISYS_LDLVL_GETVEC,"SSISYS_LDLVL_GETVEC"},
+       { SSISYS_LDLVL_PUTVEC,"SSISYS_LDLVL_PUTVEC"},
+       { SSISYS_LDLVL_PUTRCMDS,"SSISYS_LDLVL_PUTRCMDS"},
+       { SSISYS_LDLVL_SETREXEC,"SSISYS_LDLVL_SETREXEC"},
+       { SSISYS_CMS_CLUSTERID,"SSISYS_CMS_CLUSTERID"},
+       { SSISYS_CFS_STATVFS,"SSISYS_CFS_STATVFS"},
+       { SSISYS_NODE_GETNUM,"SSISYS_NODE_GETNUM"},
+       { SSISYS_NODE_TABLE,"SSISYS_NODE_TABLE"},
+       { SSISYS_NODE_DOWN,"SSISYS_NODE_DOWN"},
+       { SSISYS_RECLAIM_CHILD,"SSISYS_RECLAIM_CHILD"},
+       { SSISYS_IPC_GETINFO,"SSISYS_IPC_GETINFO"},
+       { SSISYS_ICS_TEST,"SSISYS_ICS_TEST"},
+       { SSISYS_NODE_PID,"SSISYS_NODE_PID"},
+       { SSISYS_ISLOCAL,"SSISYS_ISLOCAL"},
+       { SSISYS_CFS_ISSTACKED,"SSISYS_CFS_ISSTACKED"},
+       { SSISYS_DNET_SYNC,"SSISYS_DNET_SYNC"},
+       { SSISYS_CFS_WAIT_MODE,"SSISYS_CFS_WAIT_MODE"},
+       { SSISYS_CFS_UMOUNT,"SSISYS_CFS_UMOUNT"},
+       { SSISYS_LLSTAT,"SSISYS_LLSTAT" },
+       { SSISYS_LTS_PERFTEST,"SSISYS_LTS_PERFTEST"},
+       { SSISYS_LTS_CONFIG,"SSISYS_LTS_CONFIG"},
+       { SSISYS_SNET_PERFTEST,"SSISYS_SNET_PERFTEST"},
+       { SSISYS_IGNORE_HALFUP,"SSISYS_IGNORE_HALFUP"},
+       { SSISYS_NODE_ROOTDEV,"SSISYS_NODE_ROOTDEV"},
+       { SSISYS_GET_PRIMARY,"SSISYS_GET_PRIMARY"},
+       { SSISYS_GET_SECONDARY,"SSISYS_GET_SECONDARY"},
+       { SSISYS_GET_ROOTDISK,"SSISYS_GET_ROOTDISK"},
+       { SSISYS_CLUSTERNODE_NUM,"SSISYS_CLUSTERNODE_NUM"},
+       { SSISYS_CLUSTER_MEMBERSHIP,"SSISYS_CLUSTER_MEMBERSHIP"},
+       { SSISYS_CLUSTER_DETAILEDTRANS,"SSISYS_CLUSTER_DETAILEDTRANS"},
+       { SSISYS_CLUSTERNODE_INFO,"SSISYS_CLUSTERNODE_INFO"},
+       { SSISYS_CLUSTERNODE_SETINFO,"SSISYS_CLUSTERNODE_SETINFO"},
+       { SSISYS_CLUSTERNODE_AVAIL,"SSISYS_CLUSTERNODE_AVAIL"},
+       { SSISYS_CLUSTER_MAXNODES,"SSISYS_CLUSTER_MAXNODES"},
+       { SSISYS_SET_MEMPRIO,"SSISYS_SET_MEMPRIO"},
+       { SSISYS_GET_USERS,"SSISYS_GET_USERS"},
+       { SSISYS_FORCE_ROOT_NODE,"SSISYS_FORCE_ROOT_NODE"},
+       { SSISYS_CVIP_SET,"SSISYS_CVIP_SET"},
+       { SSISYS_CVIP_GET,"SSISYS_CVIP_GET"},
+       { SSISYS_GET_NODE_COUNTS,"SSISYS_GET_NODE_COUNTS"},
+       { SSISYS_GET_TRANSPORT,"SSISYS_GET_TRANSPORT"},
+       { 0,            NULL            },
+};
+
+int sys_ssisys (tcp)
+struct tcb *tcp;
+{
+       struct ssisys_iovec iov;
+       
+       if (entering (tcp)) {
+               if (tcp->u_arg[1] != sizeof iov ||
+                   umove (tcp, tcp->u_arg[0], &iov) < 0)
+               {
+                       tprintf ("%#lx, %ld", tcp->u_arg[0], tcp->u_arg[1]);
+                       return 0;
+               }
+               tprintf ("{id=");
+               printxval(ssi_cmd, iov.tio_id.id_cmd, "SSISYS_???");
+               tprintf (":%d", iov.tio_id.id_ver);
+               switch (iov.tio_id.id_cmd) {
+                   default:
+                       if (iov.tio_udatainlen) {
+                               tprintf (", in=[/* %d bytes */]",
+                                        iov.tio_udatainlen);
+                       }
+               }
+       }
+       else {
+               switch (iov.tio_id.id_cmd) {
+                   default:
+                       if (iov.tio_udataoutlen) {
+                               tprintf (", out=[/* %d bytes */]",
+                                        iov.tio_udataoutlen);
+                       }
+               }
+               tprintf ("}, %ld", tcp->u_arg[1]);
+       }
+       return 0;
+}
+
+#endif
+
 #endif /* UNIXWARE > 2 */
 
 #ifdef MIPS