From da5525cfcbbfde586e86372658a28af14fde0b70 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Fri, 1 Nov 2002 00:32:05 +0000 Subject: Don't allow multiple shell commands to run at the same time. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2770 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- fluid/fluid.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'fluid') diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index 580d091e2..b867b6b89 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -1,5 +1,5 @@ // -// "$Id: fluid.cxx,v 1.15.2.13.2.34 2002/10/31 18:48:58 matthiaswm Exp $" +// "$Id: fluid.cxx,v 1.15.2.13.2.35 2002/11/01 00:32:05 easysw Exp $" // // FLUID main entry for the Fast Light Tool Kit (FLTK). // @@ -623,7 +623,7 @@ void update_history(const char *flname) { // Shell command support... #if !defined(WIN32) || defined(__CYGWIN__) // Support the full piped shell command... -static FILE *shell_pipe; +static FILE *shell_pipe = 0; void shell_pipe_cb(int, void*) { @@ -650,6 +650,11 @@ do_shell_command(Fl_Return_Button*, void*) { shell_window->hide(); + if (shell_pipe) { + fl_alert("Previous shell command still running!"); + return; + } + if ((command = shell_command_input->value()) == NULL || !*command) { fl_alert("No shell command entered!"); return; @@ -845,5 +850,5 @@ int main(int argc,char **argv) { } // -// End of "$Id: fluid.cxx,v 1.15.2.13.2.34 2002/10/31 18:48:58 matthiaswm Exp $". +// End of "$Id: fluid.cxx,v 1.15.2.13.2.35 2002/11/01 00:32:05 easysw Exp $". // -- cgit v1.2.3