Copyright (C) IBM Corp. 2007
Author(s): Charles P. Wright <cpwright@us.ibm.com>

/*
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 *  Author : Richard GAYRAUD - 04 Nov 2003
 *           From Hewlett Packard Company.
 */
Index: sipp.2007-03-27/screen.cpp
===================================================================
--- sipp.2007-03-27.orig/screen.cpp
+++ sipp.2007-03-27/screen.cpp
@@ -202,10 +202,12 @@ void screen_init(char *logfile_name, voi
   }
   screen_exit_handler = exit_handler;
 
-  /* Initializes curses and signals */
-  initscr();
-  /* Enhance performances and display */
-  noecho();
+  if (backgroundMode == false) {
+    /* Initializes curses and signals */
+    initscr();
+    /* Enhance performances and display */
+    noecho();
+  }
   
   /* Map exit handlers to curses reset procedure */
   memset(&action_quit, 0, sizeof(action_quit));
@@ -217,7 +219,9 @@ void screen_init(char *logfile_name, voi
   sigaction(SIGKILL, &action_quit, NULL);  
   sigaction(SIGXFSZ, &action_file_size_exceeded, NULL);   // avoid core dump if the max file size is exceeded
 
-  printf("\033[2J");
+  if (backgroundMode == false) {
+    screen_clear();
+  }
 }
 
 void _screen_error(char *s, int fatal)
