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

Re: user

From: "Peter T(dot) Whiting" <pwhiting(at)fury(dot)ittc(dot)ukans(dot)edu>
To: pgsql-ports(at)postgresql(dot)org
Subject: Re: user
Date: 2000-05-04 22:23:42
Message-ID: 20000504172342.A32146@sprint.net (view raw or flat)
Thread:
Lists: 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(at)sprint(dot)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:
> > ---------------------------------------------------------------------
> > 
> > 

In response to

  • Re: user at 2000-05-04 21:07:55 from Peter T. Whiting

pgsql-ports by date

Next:From: W-A-S-PDate: 2000-05-05 02:11:14
Subject: ,,\/,,.Advice For New Immigrants..,,`
Previous:From: Peter T. WhitingDate: 2000-05-04 21:07:55
Subject: Re: user

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