Message: previous - next
Month: February 2014

Re: [trinity-devel] Please revert commit 77aed4a4 [Add nominal preventive maintenance in starttde]

From: Darrell <darrella@...>
Date: Tue, 25 Feb 2014 13:02:46 -0600
On Tue February 25 2014 12:47:06 pm Fran├žois Andriot wrote:
> Hello,
> I've just found out some changes in the "starttde" script, see commit 
> 77aed4a4
> I do not agree with what that patch for 2 reasons:
> 1) The principe: on my computer, I'm using TDE both on local session and 
> in remote session at the same time, using the same user account.
> So when I login remotely, this patch will probably kill my 
> locally-opened session ...
> 2) The way it is written: there are several piped commands (why not 
> using a single awk or simply use bash ?) and the code is not robust at 
> all. What is my user is called "greppy" for example ? (ok this is 
> unlikely, but not impossible). The "grep -v grep" will eliminate this 
> line ...
> Please avoid using a full-featured "ps" output then  trying to parse the 
> output!
> The "ps" command can already filter on user  (ps -u $USER) and select 
> output format (ps -o field1,field2 ...)
> So, at very least, the command could look like :
> ps -u ${USER} -o pid,cmd h | while read pid command args; do
>    case "${command##*/}" in "dcopserver"|"gam_server")
>      kill $pid ;;
>    esac
> done
> Another approach would be to parse the /proc/[0-9]*/ folders, to avoid 
> using any "ps" command at all...

Reverted in commit c3648c55.