I'm sorry to report that with this commit, installCDE.src:CleanDaemons() is utterly broken. It doesn't work at all on any platform, and breaks installation on non AIX/freebsd/openbsd/netbsd/linux platforms (eg: sun). On those platforms it tries to kill *all* running processes (!!). Fortunately, the pipeline has further problems, and bails with an error.
This code at import was originally very simple. Somehow over the years it got long and crazy. Attached is a patch which returns it to its simple form, this time with a POSIX pipeline that should run correctly anywhere (at least any POSIX 2004 platform, BSD, and AIX). -mrt
>From 0757fd6f740514bc1e9396aaa727f0ee2f52c40e Mon Sep 17 00:00:00 2001 From: "Matthew R. Trower" <d...@blackshard.net> Date: Tue, 30 Oct 2018 08:56:44 -0500 Subject: [PATCH] Repair and simplify installCDE.src:CleanDaemons() --- cde/admin/IntegTools/dbTools/installCDE.src | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/cde/admin/IntegTools/dbTools/installCDE.src b/cde/admin/IntegTools/dbTools/installCDE.src index 024a6d6f..8ae6b29a 100755 --- a/cde/admin/IntegTools/dbTools/installCDE.src +++ b/cde/admin/IntegTools/dbTools/installCDE.src @@ -201,25 +201,10 @@ CleanDaemons() then stopsrc -s inetd >>$LOGFILE 2>&1 fi - elif [ "$PLATFORM" = "openbsd" ] || [ "$PLATFORM" = "freebsd" ] || \ - [ "$PLATFORM" = "netbsd" ] || [ "$PLATFORM" = "linux" ] - then - pgrep pid,comm > /tmp/tmppsout - if [ -s /tmp/tmppsout ] - then - awk '{print "kill " $1}' /tmp/tmppsout | /bin/sh -f - sleep 2 - fi else - pgrep -v pgrep >/tmp/tmppsout - if [ -s /tmp/tmppsout ] - then - awk '{print "kill " $2}' /tmp/tmppsout | /bin/sh -f - sleep 2 - fi + ps -eo pid,comm | grep $i | awk '{print "kill " $1}' | /bin/sh fi done - rm -f /tmp/tmppsout } RestartInetd() -- 2.16.2
Jon Trulson <j...@radscan.com> writes: > Merged to master, thanks! > > Sorry for the delay in reviewing these - this week was very busy at $JOB. > > -jon > > On 08/19/2018 03:02 PM, Chase via cdesktopenv-devel wrote: >> 1st of four incoming patches >> >> Thank you for your time, >> -Chase >> >> >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> >> >> >> _______________________________________________ >> cdesktopenv-devel mailing list >> cdesktopenv-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel >> -- -mrt
_______________________________________________ cdesktopenv-devel mailing list cdesktopenv-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel