Re: [HACKERS] removing the exec() from doexec()

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: dg(at)illustra(dot)com (David Gould)
Cc: scrappy(at)hub(dot)org, brett(at)abraxas(dot)scene(dot)com, pgsql-hackers(at)hub(dot)org
Subject: Re: [HACKERS] removing the exec() from doexec()
Date: 1998-04-30 14:18:44
Message-ID: 199804301418.KAA13105@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> > > On Wed, 29 Apr 1998, Bruce Momjian wrote:
> > >
> > > > No reason for the exec(). I believe the only advantage is that it gives
> > > > us a separate process name in the 'ps' listing. I have looked into
> > > > simulating this.
> > >
> > > Under FreeBSD, there is:
> > >
> > > setproctitle(3) - set the process title for ps 1
> > >
> > > This isn't available under Solaris though, last I checked...
> >
> > Not even BSDI, which is BSD 4.4 like FreeBSD.
>
> ubik:~$ uname -a
> Linux ubik 2.0.32 #1 Wed Nov 19 00:46:45 EST 1997 i586 unknown
> ubik:~$ perl -e '$0 = "it_works!";system "ps p $$"'
> PID TTY STAT TIME COMMAND
> 7629 p8 S 0:00 it_works!

Let me clarify. BSDI does not have setproctitle, but the perl test does
works, sort of:

$ perl -e '$0 = "it_works!";system "ps -p $$"'
PID TT STAT TIME COMMAND
13095 pc S+ 0:00.02 it_works! rks! ! (perl)

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pedro J. Lobo 1998-04-30 14:28:45 Re: [HACKERS] text patch -- sugg cmd when run as root
Previous Message The Hermit Hacker 1998-04-30 13:53:43 Re: [HACKERS] text patch -- sugg cmd when run as root