*** tkps.dist	Thu Nov  3 17:06:14 1994
--- tkps	Tue Nov 15 13:16:44 1994
***************
*** 32,38 ****
  set UPDATE_PERIOD 10000 
  
  # The default double click behavior
! set USER_SIG KILL
  
  # The default command line args to "ps"
  set DEFAULT_PS_ARGS  "-auxww"
--- 32,38 ----
  set UPDATE_PERIOD 10000 
  
  # The default double click behavior
! #set USER_SIG KILL
  
  # The default command line args to "ps"
  set DEFAULT_PS_ARGS  "-auxww"
***************
*** 43,55 ****
  # 
  
  set common_sigs {
  {INT    2       interupt}
  {QUIT   3       quit}
  {IOT    6       abort}
  {KILL   9       non-catchable, non-ignorable kill}
- {STOP   17      sendable stop signal not from tty}
  {ALRM   14      alarm clock}
  {TERM   15      software termination signal}
  }
  
  
--- 43,56 ----
  # 
  
  set common_sigs {
+ {HUP    1       hangup}
  {INT    2       interupt}
  {QUIT   3       quit}
  {IOT    6       abort}
  {KILL   9       non-catchable, non-ignorable kill}
  {ALRM   14      alarm clock}
  {TERM   15      software termination signal}
+ {STOP   17      sendable stop signal not from tty}
  }
  
  
***************
*** 56,74 ****
  
  # Make a button bar for the common signals
  frame .bbar
! button .bbar.kill -text KILL -command { send_signal KILL } -font $menufont
  button .bbar.int -text INT -command { send_signal INT } -font $menufont
  button .bbar.quit -text QUIT -command { send_signal QUIT } -font $menufont
  button .bbar.iot -text IOT -command { send_signal IOT } -font $menufont
  button .bbar.term -text TERM -command { send_signal TERM } -font $menufont
  button .bbar.stop -text STOP -command { send_signal STOP } -font $menufont
- button .bbar.hup -text HUP -command { send_signal HUP } -font $menufont
  
! pack .bbar.kill  .bbar.int .bbar.quit \
!      .bbar.iot .bbar.term .bbar.stop .bbar.hup \
       -side left -padx 3m -ipadx 6m -pady 3m
  
! pack .bbar  -side bottom -expand yes -fill x -anchor w
  
  set all_sigs {
  {HUP    1       hangup}
--- 57,76 ----
  
  # Make a button bar for the common signals
  frame .bbar
! button .bbar.hup -text HUP -command { send_signal HUP } -font $menufont
  button .bbar.int -text INT -command { send_signal INT } -font $menufont
  button .bbar.quit -text QUIT -command { send_signal QUIT } -font $menufont
  button .bbar.iot -text IOT -command { send_signal IOT } -font $menufont
+ button .bbar.kill -text KILL -command { send_signal KILL } -font $menufont
  button .bbar.term -text TERM -command { send_signal TERM } -font $menufont
  button .bbar.stop -text STOP -command { send_signal STOP } -font $menufont
  
! pack .bbar.hup  .bbar.int .bbar.quit \
!      .bbar.iot .bbar.kill .bbar.term .bbar.stop \
       -side left -padx 3m -ipadx 6m -pady 3m
  
! #pack .bbar  -side bottom -expand yes -fill x -anchor w
! pack .bbar  -side bottom -fill x -anchor w
  
  set all_sigs {
  {HUP    1       hangup}
***************
*** 393,403 ****
  pack .mbar.update .mbar.help -side right
  
  ################
! tk_menuBar .mbar  .mbar.quit \
                    .mbar.options \
!                   .mbar.com_signals \
!                   .mbar.posix_signals  \
!                   .mbar.all_signals 
  
  
  
--- 395,408 ----
  pack .mbar.update .mbar.help -side right
  
  ################
! #tk_menuBar .mbar  .mbar.quit \
! #                  .mbar.options \
! #                  .mbar.com_signals \
! #                  .mbar.posix_signals  \
! #                  .mbar.all_signals 
! tk_menuBar .mbar  .mbar.file \
                    .mbar.options \
!                   .mbar.signals
  
  
  
***************
*** 416,425 ****
  bind .findbar.filterentry <Return> {update_unix_procs}
  bind .findbar.findentry <Return> {find_unix_proc}
  
  
  pack .findbar.greplabel .findbar.filterentry \
       .findbar.findlabel .findbar.findentry \
!       -side left -padx 6m -ipadx 3m
  
  pack .findbar -side top -fill x -anchor w
  
--- 421,436 ----
  bind .findbar.filterentry <Return> {update_unix_procs}
  bind .findbar.findentry <Return> {find_unix_proc}
  
+ button .findbar.renice -relief raised \
+         -text  "Renice:" -command {send_renice $niceval} \
+         -font $menufont
+ entry .findbar.niceval -width 20 -relief sunken -bd 2 -textvariable niceval
+ bind .findbar.niceval <Return> {send_renice $niceval}
  
  pack .findbar.greplabel .findbar.filterentry \
       .findbar.findlabel .findbar.findentry \
!      .findbar.renice .findbar.niceval \
!       -side left -padx 3m -ipadx 1m
  
  pack .findbar -side top -fill x -anchor w
  
***************
*** 726,732 ****
   set pids [selected_processes]
   set proceed 1
   if {$pids != {}} {
!   if {$confirm_signals} {set proceed [confirm_dialog $signal $pids]}
    if {$proceed} {
      eval exec [format "kill -%s" $signal] $pids 
    }
--- 737,743 ----
   set pids [selected_processes]
   set proceed 1
   if {$pids != {}} {
!   if {$confirm_signals} {set proceed [confirm_dialog "kill -$signal" $pids]}
    if {$proceed} {
      eval exec [format "kill -%s" $signal] $pids 
    }
***************
*** 734,739 ****
--- 745,765 ----
   }
  }
  
+ # Send renice looks at the currently selected entries in the listbox
+ # and sends a renice to all of them.
+ proc send_renice {niceval} {
+  global confirm_signals 
+  set pids [selected_processes]
+  set proceed 1
+  if {$pids != {}} {
+   if {$confirm_signals} {set proceed [confirm_dialog "renice $niceval" $pids]}
+   if {$proceed} {
+     eval exec [format "renice %s" $niceval] $pids 
+   }
+   update_unix_procs
+  }
+ }
+ 
  # get the selected entries from the listbox and extract
  # the pid fields from each selection
  proc selected_processes {} {
***************
*** 776,782 ****
    set val 1
    # create top level window
    toplevel .confirm -class Dialog
!   wm title .confirm "Confirm Kill Command"
    wm iconname .confirm Dialog
    frame .confirm.top -relief raised -bd 1
    pack .confirm.top -side top -fill both
--- 802,808 ----
    set val 1
    # create top level window
    toplevel .confirm -class Dialog
!   wm title .confirm "Confirm Command"
    wm iconname .confirm Dialog
    frame .confirm.top -relief raised -bd 1
    pack .confirm.top -side top -fill both
