comparison libgui/src/octave-gui.cc @ 17569:9d0992c6df30

arrange to pass signals to the GUI subprocess * sighandlers.h, sighandlers.cc (gui_pid): New static variable. (gui_driver_sig_handler, install_gui_driver_signal_handlers): New functions. * octave-gui.cc (dissociate_terminal): Call install_gui_driver_signal_handlers from parent process.
author John W. Eaton <jwe@octave.org>
date Fri, 04 Oct 2013 15:26:10 -0400
parents 1b388d922e6b
children 7ec70c575ad6
comparison
equal deleted inserted replaced
17568:1b388d922e6b 17569:9d0992c6df30
36 #include <sys/ioctl.h> 36 #include <sys/ioctl.h>
37 #endif 37 #endif
38 38
39 #include "lo-utils.h" 39 #include "lo-utils.h"
40 #include "oct-env.h" 40 #include "oct-env.h"
41 #include "oct-syscalls.h"
41 #include "syswait.h" 42 #include "syswait.h"
43
44 #include "sighandlers.h"
42 45
43 #include "welcome-wizard.h" 46 #include "welcome-wizard.h"
44 #include "resource-manager.h" 47 #include "resource-manager.h"
45 #include "main-window.h" 48 #include "main-window.h"
46 #include "octave-gui.h" 49 #include "octave-gui.h"
71 } 74 }
72 else 75 else
73 { 76 {
74 // Parent 77 // Parent
75 78
76 // FIXME -- we should catch signals and pass them on to the child 79 install_gui_driver_signal_handlers (pid);
77 // process in some way, possibly translating SIGINT to SIGTERM.
78 80
79 int status; 81 int status;
80 82
81 waitpid (pid, &status, 0); 83 waitpid (pid, &status, 0);
82 84