# HG changeset patch # User jwe # Date 856280008 0 # Node ID 13f134a00f1240c1b5ea3d47bf7f182a06139557 # Parent f4d0604cbcc4f3c15781d2eff1475b341ce3b42a [project @ 1997-02-18 15:33:28 by jwe] diff --git a/src/help.cc b/src/help.cc --- a/src/help.cc +++ b/src/help.cc @@ -59,6 +59,7 @@ #include "pt-pr-code.h" #include "sighandlers.h" #include "symtab.h" +#include "syswait.h" #include "toplev.h" #include "unwind-prot.h" #include "utils.h" @@ -559,8 +560,8 @@ octave_set_interrupt_handler (old_interrupt_handler); - if ((status & 0xff) == 0) - status = (status >> 8) & 0xff; + if (WIFEXITED (status)) + status = WEXITSTATUS (status); else status = 127;