diff --git a/include/sipp.hpp b/include/sipp.hpp index 03729c30c..2d6041ce6 100644 --- a/include/sipp.hpp +++ b/include/sipp.hpp @@ -294,6 +294,7 @@ extern bool extendedTwinSippMode _DEFVAL(false); extern bool nostdin _DEFVAL(false); extern bool backgroundMode _DEFVAL(false); +extern bool noscreenMode _DEFVAL(false); extern bool signalDump _DEFVAL(false); extern int currentScreenToDisplay _DEFVAL diff --git a/src/logger.cpp b/src/logger.cpp index 2dc322962..37d28b9eb 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -228,7 +228,7 @@ void print_statistics(int last) extern int command_mode; extern char *command_buffer; - if(backgroundMode == false && display_scenario) { + if(backgroundMode == false && noscreenMode == false && display_scenario) { if(!last) { screen_clear(); } diff --git a/src/screen.cpp b/src/screen.cpp index 21def0607..40d50fce4 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -46,6 +46,7 @@ unsigned long screen_errors; int screen_inited = 0; char screen_exename[255]; extern bool backgroundMode; +extern bool noscreenMode; void (*screen_exit_handler)(); @@ -117,7 +118,7 @@ void screen_exit(int rc) already_exited = 1; } - if( backgroundMode == false ) + if(backgroundMode == false && noscreenMode == false) endwin(); if(screen_exit_handler) { @@ -223,7 +224,7 @@ void screen_init(void (*exit_handler)()) screen_inited = 1; screen_exit_handler = exit_handler; - if (backgroundMode == false) { + if(backgroundMode == false && noscreenMode == false) { /* Initializes curses and signals */ initscr(); /* Enhance performances and display */ @@ -239,7 +240,7 @@ void screen_init(void (*exit_handler)()) sigaction(SIGINT, &action_quit, NULL); sigaction(SIGXFSZ, &action_file_size_exceeded, NULL); // avoid core dump if the max file size is exceeded - if (backgroundMode == false) { + if(backgroundMode == false && noscreenMode == false) { screen_clear(); } } diff --git a/src/sipp.cpp b/src/sipp.cpp index 6149ce535..f4fd207eb 100644 --- a/src/sipp.cpp +++ b/src/sipp.cpp @@ -190,6 +190,7 @@ struct sipp_option options_table[] = { {"v", "Display version and copyright information.", SIPP_OPTION_VERSION, NULL, 0}, {"bg", "Launch SIPp in background mode.", SIPP_OPTION_SETFLAG, &backgroundMode, 1}, {"nostdin", "Disable stdin.\n", SIPP_OPTION_SETFLAG, &nostdin, 1}, + {"noscreen", "Disable status and result screen.", SIPP_OPTION_SETFLAG, &noscreenMode, 1}, {"plugin", "Load a plugin.", SIPP_OPTION_PLUGIN, NULL, 1}, {"sleep", "How long to sleep for at startup. Default unit is seconds.", SIPP_OPTION_TIME_SEC, &sleeptime, 1}, {"skip_rlimit", "Do not perform rlimit tuning of file descriptor limits. Default: false.", SIPP_OPTION_SETFLAG, &skip_rlimit, 1},