sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
Re: [SM-Commit] GIT changes to master grimoire by Treeve Jelbert (ece35376414ad22a5b94569993504654aff85842)
- From: "Ethan Grammatikidis" <eekee57 AT fastmail.fm>
- To: sm-commit AT lists.ibiblio.org
- Subject: Re: [SM-Commit] GIT changes to master grimoire by Treeve Jelbert (ece35376414ad22a5b94569993504654aff85842)
- Date: Wed, 15 Apr 2009 23:14:06 +0100
On Mon, 13 Apr 2009 12:29 +0200, "Jaka Kranjc" <smgl AT lynxlynx.info>
wrote:
> On Monday 13 of April 2009 11:39:39 Treeve Jelbert wrote:
> > --- /dev/null
> > +++ b/database/virtuoso/PREPARE
> > @@ -0,0 +1,6 @@
> > +# check for running server
> > + (ps -A | grep virtuoso) &&
> > + message ${PROBLEM_COLOR}please stop the virtuoso server and try
> > again\
> > + ${DEFAULT_COLOR} &&
> > + return 1
> > +
> Wouldn't this always fail? If grep finds a match, the chain will continue
> and
> return 1. If it doesn't find a match, the chain will break and the return
> status will be implicitly 1 again.
>
> btw, you can also use the -q option to grep to suppres its output.
There is an additional problem. Applying grep to the output of ps is
likely to match on the grep command itself, thus:
$ ps x|grep irssi
5703 pts/4 S+ 11:20 irssi
30307 pts/16 S+ 0:00 grep irssi
Does the -A option prevent this? The man page gives no indication, and
frankly I can't see how ps can guarantee not to include grep in it's
list. It's something of a race condition, all depending on how fast ps
and grep respectively start up. OTOH I can't get it to break with -A.
--
wow.. wondering how to make it more general and less hard-coded is making my
head hurt. that's a good sign that it's my code
-
[SM-Commit] GIT changes to master grimoire by Treeve Jelbert (ece35376414ad22a5b94569993504654aff85842),
Treeve Jelbert, 04/13/2009
-
Re: [SM-Commit] GIT changes to master grimoire by Treeve Jelbert (ece35376414ad22a5b94569993504654aff85842),
Jaka Kranjc, 04/13/2009
-
Re: [SM-Commit] GIT changes to master grimoire by Treeve Jelbert (ece35376414ad22a5b94569993504654aff85842),
Ethan Grammatikidis, 04/15/2009
- Re: [SM-Commit] GIT changes to master grimoire by Treeve Jelbert (ece35376414ad22a5b94569993504654aff85842), Andraž 'ruskie' Levstik, 04/16/2009
-
Re: [SM-Commit] GIT changes to master grimoire by Treeve Jelbert (ece35376414ad22a5b94569993504654aff85842),
Ethan Grammatikidis, 04/15/2009
- <Possible follow-up(s)>
-
[SM-Commit] GIT changes to master grimoire by Treeve Jelbert (ece35376414ad22a5b94569993504654aff85842),
Treeve Jelbert, 04/13/2009
- Re: [SM-Commit] GIT changes to master grimoire by Treeve Jelbert (ece35376414ad22a5b94569993504654aff85842), Ladislav Hagara, 04/13/2009
-
Re: [SM-Commit] GIT changes to master grimoire by Treeve Jelbert (ece35376414ad22a5b94569993504654aff85842),
Jaka Kranjc, 04/13/2009
Archive powered by MHonArc 2.6.24.