struct tcb *tcp;
{
if (exiting(tcp)) {
- tprintf("child_stack=%#lx, flags=", tcp->u_arg[1]);
- if (printflags(clone_flags, tcp->u_arg[0]) == 0)
+ long flags, stack;
+# if defined S390 || defined S390X
+ /* For some reason, S390 has the stack argument first. */
+ stack = tcp->u_arg[0];
+ flags = tcp->u_arg[1];
+# else
+ flags = tcp->u_arg[0];
+ stack = tcp->u_arg[1];
+# endif
+ tprintf("child_stack=%#lx, flags=", stack);
+ if (printflags(clone_flags, flags) == 0)
tprintf("0");
- if ((tcp->u_arg[0] & (CLONE_PARENT_SETTID|CLONE_CHILD_SETTID
+ if ((flags & (CLONE_PARENT_SETTID|CLONE_CHILD_SETTID
|CLONE_SETTLS)) == 0)
return 0;
- if (tcp->u_arg[0] & CLONE_PARENT_SETTID) {
+ if (flags & CLONE_PARENT_SETTID) {
int pid;
if (umove(tcp, tcp->u_arg[2], &pid) == 0)
tprintf(", [%d]", pid);
else
tprintf(", <ignored>");
#ifdef I386
- if (tcp->u_arg[0] & CLONE_SETTLS) {
+ if (flags & CLONE_SETTLS) {
struct modify_ldt_ldt_s copy;
if (umove(tcp, tcp->u_arg[3], ©) != -1) {
tprintf(", {entry_number:%d, ",
#else
# define TIDARG 3
#endif
- if (tcp->u_arg[0] & CLONE_CHILD_SETTID)
+ if (flags & CLONE_CHILD_SETTID)
tprintf(", %#lx", tcp->u_arg[TIDARG]);
#undef TIDARG
}
tprintf("]");
}
}
-#ifdef LINUX
-#if defined(ALPHA) || defined(SPARC) || defined(POWERPC) || defined(IA64) || defined(HPPA) || defined(SH)
+#if defined LINUX && defined TCB_WAITEXECVE
tcp->flags |= TCB_WAITEXECVE;
-#endif /* ALPHA || SPARC || POWERPC || IA64 || HPPA || SH */
-#endif /* LINUX */
+#endif /* LINUX && TCB_WAITEXECVE */
return 0;
}