Ignore:
Timestamp:
Apr 10, 2008, 1:13:58 AM (16 years ago)
Author:
Bruno Cornec
Message:

merge -r 1842:1889 2.2.5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/common/newt-specific.c

    r1770 r1903  
    259259    kill_anything_like_this(char *str) {
    260260
    261     char *tmp = NULL;
    262 
    263     mr_asprintf(&tmp,"kill `ps %s | grep \" %s \" | awk '{print %s;}' | grep -v \"grep\"`", ps_options, str, ps_proc_id);
     261char *tmp = NULL;
     262char *tmp1 = NULL;
     263
     264    mr_asprintf(&tmp,"ps %s | grep \" %s \" | awk '{print %s;}' | grep -v \"grep\"", ps_options, str, ps_proc_id);
    264265    run_program_and_log_output(tmp, TRUE);
     266    if (strlen(tmp) > 0) {
     267        mr_asprintf(&tmp1,"kill `%s`", tmp);
     268        run_program_and_log_output(tmp1, TRUE);
     269        paranoid_free(tmp1);
     270    }
    265271    mr_free(tmp);
    266272}
Note: See TracChangeset for help on using the changeset viewer.