1 #include "beos/beosish.h"
7 /* In BeOS 5.0 the waitpid() seems to misbehave in that the status
8 * has the upper and lower bytes swapped compared with the usual
9 * POSIX/UNIX implementations. To undo the surpise effect to the
10 * rest of Perl we need this wrapper. (The rest of BeOS might be
11 * surprised because of this, though.) */
13 pid_t beos_waitpid(pid_t process_id, int *status_location, int options) {
14 pid_t got = waitpid(process_id, status_location, options);
17 (*status_location & 0x00FF) << 8 |
18 (*status_location & 0xFF00) >> 8;