Return-Path: Delivered-To: apmail-gump-general-archive@www.apache.org Received: (qmail 57705 invoked from network); 20 Apr 2005 19:20:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Apr 2005 19:20:43 -0000 Received: (qmail 12993 invoked by uid 500); 20 Apr 2005 19:20:49 -0000 Delivered-To: apmail-gump-general-archive@gump.apache.org Received: (qmail 12925 invoked by uid 500); 20 Apr 2005 19:20:48 -0000 Mailing-List: contact general-help@gump.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Gump code and data" Reply-To: "Gump code and data" Delivered-To: mailing list general@gump.apache.org Received: (qmail 12882 invoked by uid 99); 20 Apr 2005 19:20:47 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from netlx014.civ.utwente.nl (HELO netlx014.civ.utwente.nl) (130.89.1.88) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 20 Apr 2005 12:20:47 -0700 Received: from [130.89.169.128] (giraffe.student.utwente.nl [130.89.169.128]) by netlx014.civ.utwente.nl (8.11.7/HKD) with ESMTP id j3KJJrp20800 for ; Wed, 20 Apr 2005 21:19:53 +0200 Message-ID: <4266AB59.7020708@leosimons.com> Date: Wed, 20 Apr 2005 21:19:53 +0200 From: Leo Simons User-Agent: Mozilla Thunderbird 1.0 (X11/20050111) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Gump code and data Subject: Re: Need testers for gump3 branch + windows References: <02ad01c544f4$5234fb00$6501a8c0@sybase.com> In-Reply-To: <02ad01c544f4$5234fb00$6501a8c0@sybase.com> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact helpdesk@ITBE.utwente.nl for more information. X-UTwente-MailScanner: Found to be clean X-MailScanner-From: mail@leosimons.com X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Adam R. B. Jack wrote: >>I just committed some updates to the gump3 branch that "on my machine", >>allow me to run on cygwin+winxp+python2.4-win32. Could some people try and >>follow > > Some cygwin testing: Thanks! > $ bash gump webgump > hostname: invalid option -- s > Try `hostname --help' for more information. > ./bin/debug: line 24: > /cygdrive/f/data/Python/Gump3-SVN/webgump/lib/apache2-inst > all/current/bin/httpd: No such file or directory ah right, I suspect that the "webgump" code will currently only "work on my machine", and even that is dubious. I have no idea whether we should move forward with it. Basically for me it mostly depends on how much time Stefano and fellow cocooners want to invest in dynagump, 'cuz I certainly can't get that implemented on my own. > $ bash gump kill > ps: unknown option -- o ugh. I forgot; one pretty much cannot count on ps working well on cygwin at all. -o is probably a GNU extension. We'll probably have to grep/sed/awk our way through this. "Please file an issue" kind of thing ;) > BTW: On posix I was able to lock the "pid file" and test if that file was > still locked, i.e. the process was running. For cron based automatic runs I > think that is nicer than requiring a manual kill. Something (IMHO) to add to > the wish list sometime. Well, I'm no expert, but I believe that file locking is usually not considered very reliable or portable. At least the sysvinit packages that float around various linux distributions inspect /proc and compare with a pid file instead of using locking. If its worked for unix since sysv, it might make sense just to copy. In fact, I basically took a look at the sh functions sourced from /etc/init.d files and tried to copy what they did. Just need to figure out how to interact with /proc on cygwin and we can lose the use of "ps" and be portable and robust and all. I.e. (from /lib/lsb/init-functions on my machine, snippet copyright Chris Lawrence, all rights reserved) pidofproc () { local pidfile line i pids= status set -- `POSIXLY_CORRECT=1 getopt "p:" $*` pidfile= for i in $*; do case $i in -p) pidfile=$2; shift 2;; --) shift; break;; esac done if [ -z "$pidfile" ]; then pidfile=/var/run/$(basename "$1").pid fi if [ -f "$pidfile" ]; then read -d "" line < "$pidfile" for i in $line; do if [ -z "$(echo $p | sed 's/[0-9]//g')" -a -d "/proc/$i" ]; then pids="$i $pids" fi done if [ -n "$pids" ]; then echo "$pids" return 0 else return 2 # program is dead and /var/run pid file exists fi elif [ -x /bin/pidof ]; then /bin/pidof -o %PPID $1 status="$?" [ "$status" = 1 ] && return 3 # program is not running return 0 else return 4 # program or service is unknown fi } Do you have any pointers to docs where they suggest doing things differently? cheers! Leo --------------------------------------------------------------------- To unsubscribe, e-mail: general-unsubscribe@gump.apache.org For additional commands, e-mail: general-help@gump.apache.org