summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-11-01 00:32:05 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-11-01 00:32:05 +0000
commitda5525cfcbbfde586e86372658a28af14fde0b70 (patch)
tree646a5d578055c5e61752ec76b3c7d659c9f15f8d
parentf4a60090ba4f4256eeb03d5378d301fd3df40e5c (diff)
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
-rw-r--r--fluid/fluid.cxx11
1 files changed, 8 insertions, 3 deletions
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 $".
//