Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] text patch -- sugg cmd when run as root

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: David Gould <dg(at)illustra(dot)com>
Cc: Brett McCormick <brett(at)work(dot)chicken(dot)org>, pgsql-hackers(at)hub(dot)org
Subject: Re: [HACKERS] text patch -- sugg cmd when run as root
Date: 1998-04-30 13:53:43
Message-ID: Pine.NEB.3.95.980430095307.10212N-100000@hub.org (view raw or flat)
Thread:
Lists: pgsql-hackers
On Wed, 29 Apr 1998, David Gould wrote:

> > When you run postgresql as root, the command it gives for putting in
> > your startup script is a little weird.  The main issue is that 2>&1
> > only works in bash, not tcsh.  >& works in both, so it seems
> > preferable.  Another minor issue is that it echoes the command and
> > pipes it through su.  Shouldn't this be "su - postgres -c 'cmd'"?  Do
> > all versions of su have the '-c' argument?  piping it through seems
> > weird, but maybe it isn't.
> > 
> > this is a straight diff for src/backend/main/main.c
> > 
> > --cut here--
> > 38c38
> > < echo \"postmaster -B 256 >/var/log/pglog 2>&1 &\" | su - postgres\n\n"
> > ---
> > > su - postgres -c 'postmaster -B 256 >& /var/log/pglog' &\n\n"
> > --cut here--
> 
> You have tcsh as the root shell??? 

	As do I...so?  I just make sure I put a copy in /bin and you're
fine...or, at least, I haven't been burnt yet.  I can't stand the other
shells :(



In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-04-30 14:18:44
Subject: Re: [HACKERS] removing the exec() from doexec()
Previous:From: Gautam H ThakerDate: 1998-04-30 13:40:24
Subject: [Fwd: [QUESTIONS] an apparent error in answer from "##" (closest proximity)operator]

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group