Ignore:
Timestamp:
Nov 13, 2006, 10:17:07 AM (13 years ago)
Author:
bruno
Message:

ps (busybox) and ps (system) do not give PID in the same column. Adapted with a global variable.

File:
1 edited

Legend:

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

    r883 r928  
    129129    extern char *g_mondo_home;
    130130    extern char *ps_options;
     131    extern char *ps_proc_id;
    131132
    132133    extern void set_signals(int);
     
    348349char *tmp = NULL;
    349350
    350 asprintf(&tmp,"kill `ps %s | grep \" %s \" | awk '{print $1;}' | grep -vx \"\\?\"`", ps_options, str);
     351asprintf(&tmp,"kill `ps %s | grep \" %s \" | awk '{print %s;}' | grep -vx \"\\?\"`", ps_options, str , ps_proc_id);
    351352run_program_and_log_output(tmp, TRUE);
    352353paranoid_free(tmp);
Note: See TracChangeset for help on using the changeset viewer.