ctubbsii opened a new issue #243: uno kill (and uno stop, etc.) doesn't always 
work: pgrep/pkill limitations
URL: https://github.com/apache/fluo-uno/issues/243
 
 
   Uno uses pgrep (and pkill) to locate processes (and terminate them).
   
   However, it also tends to start processes with long command lines. 
Unfortunately, this hits an annoying limit of pgrep and pkill, which can only 
match on the first 4096 characters in a command name. This means sometimes 
processes aren't found, and can be left running.
   
   This seems to be a hard-limit (see 
https://unix.stackexchange.com/questions/570819/pgrep-f-matches-on-first-4096-characters-only)
 that would require recompiling pgrep and pkill to work around.
   
   Some initial ideas:
   
   1. We write our own custom pgrep and pkill functions which use `ps -eo 
pid,comm`, `grep -E`, and `awk '{print $1}'` internally.
   2. Try to see if the command-lines can be shortened (export CLASSPATH 
instead of use `-cp` for java, as one example).
   3. Create wrapper controller scripts which are easier to pattern match with 
pgrep/pkill, and which terminate the process they control when they trap a 
specific termination signal that uno scripts send.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to