Re: user - Mailing list pgsql-ports

From Peter T. Whiting
Subject Re: user
Date
Msg-id 20000504172342.A32146@sprint.net
Whole thread Raw
In response to Re: user  ("Peter T. Whiting" <pwhiting@fury.ittc.ukans.edu>)
List pgsql-ports
It seems my "system" system call gives a bad return code.  I noticed
that the files were actually being copied, even though the call was
returning with a -1.  I made sure the cp command didn't return a
-1 from the command line when executed with the exact same arguements.
I modified the code to ignore the return value of "system".  Works
fine now.

This is probably a problem limitied to my system.

Sorry for the noise.

pete

On Thu, May 04, 2000 at 04:07:55PM -0500, Peter T. Whiting wrote:
> thinking the test if(system(buf)!=0) might be the problem (-1
> would indicate an error) I changed it to if(system(buf)==-1).
> Same error.
>
> pete
>
> On Thu, May 04, 2000 at 03:43:21PM -0500, Peter T. Whiting wrote:
> > ============================================================================
> >                         POSTGRESQL BUG REPORT TEMPLATE
> > ============================================================================
> >
> >
> > Your name               :   Peter Whiting
> > Your email address      :   pwhiting@sprint.net
> >
> >
> > System Configuration
> > ---------------------
> >   Architecture (example: Intel Pentium)         :   SunOS alta 5.6 Generic sun4u sparc SUNW,Ultra-1
> >
> >   Operating System (example: Linux 2.0.26 ELF)  :   solaris 2.6
> >
> >   PostgreSQL version (example: PostgreSQL-6.5.1):   postgresql-7.0RC3
> >
> >   Compiler used (example:  gcc 2.8.0)           :   gcc version 2.7.2.3
> >
> >
> >
> > Please enter a FULL description of your problem:
> > ------------------------------------------------
> >
> > Creating a new database results in an error:
> >
> > ERROR:  CREATE DATABASE: Could not initialize database directory.
> > Delete failed as well
> >
> > I have verified that the postgres user has proper write permissions to
> > the directory.
> > I modified postgresql-7.0RC3/src/backend/commands/dbcommands.c to print
> > out more information  (currently it doesn't print out much failure info
> > when the cp failes.)
> >
> > In createdb(const char *dbname, const char *dbpath, int encoding) I print
> > out the attempted command (stored in buf) and the error string when system
> > fails.  The message I get:
> >
> > ERROR:  CREATE DATABASE: attempted cp /usr/local/pgsql/data/base/template1/*
> >  '/usr/local/pgsql/data/base/test5' : No child processes
> >
> > I can execute the cp from the command line as is and it works.
> > The error message indicates it isn't a permission problem.
> >
> > ideas?
> >
> >
> > Please describe a way to repeat the problem.   Please try to provide a
> > concise reproducible example, if at all possible:
> > ----------------------------------------------------------------------
> >
> > createdb test5
> >
> >
> > If you know how this problem might be fixed, list the solution below:
> > ---------------------------------------------------------------------
> >
> >

pgsql-ports by date:

Previous
From: "Peter T. Whiting"
Date:
Subject: Re: user
Next
From: W-A-S-P@eaglhuqdix.org
Date:
Subject: ,,\/,,.Advice For New Immigrants..,,`