Changeset 792 in MondoRescue
- Timestamp:
- Sep 13, 2006, 11:48:01 PM (19 years ago)
- Location:
- branches/stable/mondo/mondo
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/mondo/common/libmondo-fifo.c
r681 r792 136 136 /* @} - end of globalGroup */ 137 137 138 extern char *ps_options; 138 139 139 140 /** … … 210 211 } 211 212 sleep(2); 212 sprintf(tmp, "ps wwax | grep \"%s\"", g_sz_call_to_buffer);213 sprintf(tmp, "ps %s | grep \"%s\"", ps_options, g_sz_call_to_buffer); 213 214 if (run_program_and_log_output(tmp, 2)) { 214 215 log_msg(2, "Warning - I think I failed to open tape, actually."); … … 216 217 g_tape_buffer_size_MB = bufsize; 217 218 tmp[30] = '\0'; 218 sprintf(command, "ps wwax | grep buffer | grep -v grep");219 sprintf(command, "ps %s | grep buffer | grep -v grep", ps_options); 219 220 if (run_program_and_log_output(command, 1)) { 220 221 fres = NULL; … … 242 243 paranoid_system("sync"); 243 244 sprintf(command, 244 "ps wwax | grep -F \"%s\" | grep -Fv grep | awk '{print $1;}' | grep -v PID | tr -s '\n' ' ' | awk '{ print $1; }'",245 "ps | grep -F \"%s\" | grep -Fv grep | awk '{print $1;}' | grep -v PID | tr -s '\n' ' ' | awk '{ print $1; }'", ps_options, 245 246 g_sz_call_to_buffer); 246 247 log_msg(2, "kill_buffer() --- command = %s", command); -
branches/stable/mondo/mondo/common/my-stuff.h
r686 r792 439 439 */ 440 440 #define MALLOC_CHECK_ 1 441 442 /**443 * Kill any process containing the string @p x surrounded by spaces in its commandline.444 */445 #define kill_anything_like_this(x) {run_program_and_log_output("kill `ps wax | grep \"" x "\" | awk '{print $1;}' | grep -vx \"\\?\"`", TRUE);}446 441 447 442 /** -
branches/stable/mondo/mondo/common/newt-specific.c
r738 r792 128 128 extern char *g_boot_mountpt; 129 129 extern char *g_mondo_home; 130 extern char *ps_options; 130 131 131 132 extern void set_signals(int); … … 340 341 } 341 342 342 343 /** 344 * Kill any process containing the string @p str surrounded by spaces in its commandline. 345 */ 346 void kill_anything_like_this(char *str) { 347 348 char *tmp = NULL; 349 350 asprintf(&tmp,"kill `ps %s | grep \"" %s "\" | awk '{print $1;}' | grep -vx \"\\?\"`", ps_options, str); 351 run_program_and_log_output(tmp, TRUE); 352 paranoid_free(tmp); 353 } 343 354 344 355 -
branches/stable/mondo/mondo/mondoarchive/main.c
r541 r792 140 140 bool g_skip_floppies; 141 141 long diffs; 142 char *ps_options = "auxww"; 142 143 143 144 extern t_bkptype g_backup_media_type; -
branches/stable/mondo/mondo/mondorestore/mondo-restore.c
r684 r792 488 488 */ 489 489 char *g_mondo_home; 490 491 char *ps_options = ""; 490 492 491 493 /* @} - end of "Restore-Time Globals" in globalGroup */ -
branches/stable/mondo/mondo/mondorestore/mondo-rstr-tools.c
r746 r792 513 513 malloc_string(command); 514 514 sprintf(command, 515 "kill `ps wax2> /dev/null | grep petris 2> /dev/null | grep -v grep | cut -d' ' -f2` 2> /dev/null");515 "kill `ps 2> /dev/null | grep petris 2> /dev/null | grep -v grep | cut -d' ' -f2` 2> /dev/null"); 516 516 paranoid_system(command); 517 517 paranoid_free(command); … … 2179 2179 && 2180 2180 run_program_and_log_output 2181 ("ps wax| grep buffer | grep -v \"grep buffer\"", TRUE) == 0;2181 ("ps | grep buffer | grep -v \"grep buffer\"", TRUE) == 0; 2182 2182 i++) { 2183 2183 sleep(1);
Note:
See TracChangeset
for help on using the changeset viewer.