Ignore:
Timestamp:
Sep 13, 2006, 11:48:01 PM (18 years ago)
Author:
Bruno Cornec
Message:

Fix Bug #24

  • Introduce kill_anything_like_this as a function instead of define
  • Add an external variable ps_options whose value is empty in restore and auxww in archive
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/mondo/common/libmondo-fifo.c

    r681 r792  
    136136/* @} - end of globalGroup */
    137137
     138extern char *ps_options;
    138139
    139140/**
     
    210211    }
    211212    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);
    213214    if (run_program_and_log_output(tmp, 2)) {
    214215        log_msg(2, "Warning - I think I failed to open tape, actually.");
     
    216217    g_tape_buffer_size_MB = bufsize;
    217218    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);
    219220    if (run_program_and_log_output(command, 1)) {
    220221        fres = NULL;
     
    242243    paranoid_system("sync");
    243244    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,
    245246            g_sz_call_to_buffer);
    246247    log_msg(2, "kill_buffer() --- command = %s", command);
Note: See TracChangeset for help on using the changeset viewer.