linux_misc.c (680982281b7788a1335e72097d18ab8ece93e7b5) linux_misc.c (4ab7403bbd76f466d482cd69035091c04e409c09)
1/*-
2 * Copyright (c) 2002 Doug Rabson
3 * Copyright (c) 1994-1995 Søren Schmidt
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 857 unchanged lines hidden (view full) ---

866 error = kern_wait(td, pid, &tmpstat, options, ru);
867 if (error)
868 return (error);
869
870 if (status) {
871 tmpstat &= 0xffff;
872 if (WIFSIGNALED(tmpstat))
873 tmpstat = (tmpstat & 0xffffff80) |
1/*-
2 * Copyright (c) 2002 Doug Rabson
3 * Copyright (c) 1994-1995 Søren Schmidt
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 857 unchanged lines hidden (view full) ---

866 error = kern_wait(td, pid, &tmpstat, options, ru);
867 if (error)
868 return (error);
869
870 if (status) {
871 tmpstat &= 0xffff;
872 if (WIFSIGNALED(tmpstat))
873 tmpstat = (tmpstat & 0xffffff80) |
874 BSD_TO_LINUX_SIGNAL(WTERMSIG(tmpstat));
874 bsd_to_linux_signal(WTERMSIG(tmpstat));
875 else if (WIFSTOPPED(tmpstat))
876 tmpstat = (tmpstat & 0xffff00ff) |
875 else if (WIFSTOPPED(tmpstat))
876 tmpstat = (tmpstat & 0xffff00ff) |
877 (BSD_TO_LINUX_SIGNAL(WSTOPSIG(tmpstat)) << 8);
877 (bsd_to_linux_signal(WSTOPSIG(tmpstat)) << 8);
878 else if (WIFCONTINUED(tmpstat))
879 tmpstat = 0xffff;
880 error = copyout(&tmpstat, status, sizeof(int));
881 }
882
883 return (error);
884}
885

--- 96 unchanged lines hidden (view full) ---

982 if (error != 0)
983 return (error);
984 }
985 if (args->info != NULL) {
986 p = td->td_proc;
987 if (td->td_retval[0] == 0)
988 bzero(&lsi, sizeof(lsi));
989 else {
878 else if (WIFCONTINUED(tmpstat))
879 tmpstat = 0xffff;
880 error = copyout(&tmpstat, status, sizeof(int));
881 }
882
883 return (error);
884}
885

--- 96 unchanged lines hidden (view full) ---

982 if (error != 0)
983 return (error);
984 }
985 if (args->info != NULL) {
986 p = td->td_proc;
987 if (td->td_retval[0] == 0)
988 bzero(&lsi, sizeof(lsi));
989 else {
990 sig = BSD_TO_LINUX_SIGNAL(siginfo.si_signo);
990 sig = bsd_to_linux_signal(siginfo.si_signo);
991 siginfo_to_lsiginfo(&siginfo, &lsi, sig);
992 }
993 error = copyout(&lsi, args->info, sizeof(lsi));
994 }
995 td->td_retval[0] = 0;
996
997 return (error);
998}

--- 1415 unchanged lines hidden ---
991 siginfo_to_lsiginfo(&siginfo, &lsi, sig);
992 }
993 error = copyout(&lsi, args->info, sizeof(lsi));
994 }
995 td->td_retval[0] = 0;
996
997 return (error);
998}

--- 1415 unchanged lines hidden ---