diff liboctave/system/oct-syscalls.h @ 21921:ecfcc8527661

hide sys/wait.h header and provide wrappers for waitpid macros * bootstrap.conf: Use sys_wait and waitpid gnulib modules. * liboctave/wrappers/wait-wrappers.c, added liboctave/wrappers/wait-wrappers.h: New files. * changed liboctave/wrappers/module.mk: Update. * liboctave/system/syswait.h: Delete. * liboctave/system/module.mk: Update. * oct-syscalls.cc, oct-syscalls.h (wcontinue, wcoredump, wifcontinued, wifexited, wifsignaled, wifstopped, wexitstatus, wnohang, wstopsig, wtermsig, wuntraced): New functions. (waitpid): Use octave_waitpid_wrapper. * lo-cutils.c, lo-cutils.h (octave_waitpid, octave_wifexited, octave_wexitstatus, octave_wifsignaled, octave_wtermsig, octave_wcoredump, octave_wifstopped, octave_wstopsig, octave_wifcontinued): Delete. * lo-utils.h (class octave_wait): Delete. * octave-gui.cc, help.cc: Don't include sys/wait.h. * pager.cc, sighandlers.cc, syscalls.cc, toplev.cc: Use wait functions from octave::sys namespace. * main.in.cc: Use wait-wrappers.h. * src/module.mk: Update.
author John W. Eaton <jwe@octave.org>
date Thu, 16 Jun 2016 01:00:20 -0400
parents 11af9c03400c
children 55f7de37b618
line wrap: on
line diff
--- a/liboctave/system/oct-syscalls.h	Wed Jun 15 16:41:02 2016 -0400
+++ b/liboctave/system/oct-syscalls.h	Thu Jun 16 01:00:20 2016 -0400
@@ -66,6 +66,28 @@
     extern OCTAVE_API pid_t waitpid (pid_t, int *status, int);
     extern OCTAVE_API pid_t waitpid (pid_t, int *status, int, std::string&);
 
+    extern OCTAVE_API int wcontinue (void);
+
+    extern OCTAVE_API int wcoredump (int status);
+
+    extern OCTAVE_API bool wifcontinued (int status);
+
+    extern OCTAVE_API bool wifexited (int status);
+
+    extern OCTAVE_API bool wifsignaled (int status);
+
+    extern OCTAVE_API bool wifstopped (int status);
+
+    extern OCTAVE_API int wexitstatus (int status);
+
+    extern OCTAVE_API int wnohang (void);
+
+    extern OCTAVE_API int wstopsig (int status);
+
+    extern OCTAVE_API int wtermsig (int status);
+    
+    extern OCTAVE_API int wuntraced (void);
+
     extern OCTAVE_API int kill (pid_t, int);
     extern OCTAVE_API int kill (pid_t, int, std::string&);