slackware-current/source/n/netkit-rsh/netkit-rsh.union_wait.diff

21 lines
515 B
Diff
Raw Normal View History

--- ./rlogin/rlogin.c.orig 2000-07-22 23:16:22.000000000 -0500
+++ ./rlogin/rlogin.c 2018-04-10 02:10:07.255976504 -0500
@@ -420,7 +420,7 @@
void
catch_child(int ignore)
{
- union wait status;
+ int status;
int pid;
(void)ignore;
@@ -431,7 +431,7 @@
return;
/* if the child (reader) dies, just quit */
if (pid < 0 || (pid == childpid && !WIFSTOPPED(status)))
- done((int)(status.w_termsig | status.w_retcode));
+ done((int)(WTERMSIG(status) | WEXITSTATUS(status)));
}
/* NOTREACHED */
}