From: Peter C. <pc...@us...> - 2010-02-03 01:27:04
|
Update of /cvsroot/ipbench/ipbench2/src/tests/wrapper In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20202/src/tests/wrapper Modified Files: client_wrapper.c common.c Log Message: Many minor mods: --- rename ipbench.py and ipbenchd.py to remove suffix --- Check return values on system() , nice() etc., to allow building with -Werror --- Fix installation varation between Ubuntu and Debian: site-packages vs dist-packages. Index: client_wrapper.c =================================================================== RCS file: /cvsroot/ipbench/ipbench2/src/tests/wrapper/client_wrapper.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** client_wrapper.c 5 May 2005 02:37:34 -0000 1.9 --- client_wrapper.c 3 Feb 2010 01:26:51 -0000 1.10 *************** *** 21,25 **** /* XXX arguments */ ! system(start_filename); return 0; --- 21,28 ---- /* XXX arguments */ ! if (system(start_filename) == -1) { ! dbprintf("%s failed: %s\n", start_filename, strerror(errno)); ! return 1; ! } return 0; *************** *** 32,36 **** dbprintf ("[client_wrap_stop] calling %s \n", stop_filename); ! system(stop_filename); return 0; } --- 35,42 ---- dbprintf ("[client_wrap_stop] calling %s \n", stop_filename); ! if (system(stop_filename) == -1) { ! dbprintf("%s failed: %s\n", strerror(errno)); ! return 1; ! } return 0; } Index: common.c =================================================================== RCS file: /cvsroot/ipbench/ipbench2/src/tests/wrapper/common.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** common.c 23 Feb 2005 01:17:05 -0000 1.7 --- common.c 3 Feb 2010 01:26:51 -0000 1.8 *************** *** 74,78 **** } else { ! dbprintf("Invlid argument %s=%s.\n", cmd, val); return -1; } --- 74,78 ---- } else { ! dbprintf("Invalid argument %s=%s.\n", cmd, val); return -1; } *************** *** 90,94 **** pid_t pid; ! pipe(p); pid = fork(); --- 90,98 ---- pid_t pid; ! if (pipe(p)) { ! dbprintf("pipe: %s\n", strerror(errno)); ! return -1; ! } ! pid = fork(); *************** *** 101,105 **** /* capture stdout */ dup2(p[1],1); ! system(output_filename); close(p[1]); exit(0); --- 105,112 ---- /* capture stdout */ dup2(p[1],1); ! if (system(output_filename) == -1) { ! dbprintf("[target_wrap_marshall] %s failed\n", output_filename); ! exit(1); ! } close(p[1]); exit(0); |