diff options
author | mike <mike@FreeBSD.org> | 2002-06-03 23:13:11 +0000 |
---|---|---|
committer | mike <mike@FreeBSD.org> | 2002-06-03 23:13:11 +0000 |
commit | 9b39ed7b9416390758870edd85ae19dbee651312 (patch) | |
tree | a21f8895cdfa7f50dfa0df9ee4a19954b3330375 /usr.bin/rlogin/rlogin.c | |
parent | d9ab0c8dbcc15d1f11216307b235370b43767371 (diff) | |
download | FreeBSD-src-9b39ed7b9416390758870edd85ae19dbee651312.zip FreeBSD-src-9b39ed7b9416390758870edd85ae19dbee651312.tar.gz |
Use POSIX macros for wait(2)-style status information instead of the
deprecated 4.2/4.3BSD wait union. Fix some nearby pid_t/int
confusion.
Diffstat (limited to 'usr.bin/rlogin/rlogin.c')
-rw-r--r-- | usr.bin/rlogin/rlogin.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/rlogin/rlogin.c b/usr.bin/rlogin/rlogin.c index 5642066..edf908b 100644 --- a/usr.bin/rlogin/rlogin.c +++ b/usr.bin/rlogin/rlogin.c @@ -468,16 +468,16 @@ writeroob(int signo __unused) void catch_child(int signo __unused) { - union wait status; - int pid; + pid_t pid; + int status; for (;;) { - pid = wait3((int *)&status, WNOHANG|WUNTRACED, NULL); + pid = wait3(&status, WNOHANG|WUNTRACED, NULL); if (pid == 0) return; /* if the child (reader) dies, just quit */ if (pid < 0 || (pid == child && !WIFSTOPPED(status))) - done((int)(status.w_termsig | status.w_retcode)); + done(WTERMSIG(status) | WEXITSTATUS(status)); } /* NOTREACHED */ } |