postgresql/src/backend/port/darwin
2002-05-05 01:03:26 +00:00
..
Makefile First test of Darwin port with POSIX semaphore code. 2002-05-05 01:03:26 +00:00
README First test of Darwin port with POSIX semaphore code. 2002-05-05 01:03:26 +00:00
system.c Fix indenting for 'extern "C"' cases. 2001-11-08 20:37:52 +00:00

The file system.c included herein is taken directly from Apple's Darwin
open-source CVS archives, and is redistributed under the BSD copyright
notice it bears.  (According to Apple's CVS logs, their version is
identical to the FreeBSD original.)  It provides our own implementation of
the system(3) function, which ought by all rights to be identical to the
one provided in libc on Darwin machines.  Nonetheless, this version works,
whereas the one that actually ships with Mac OS X 10.1 doesn't.  The
shipped version appears to disconnect the calling process from any shared
memory segments it is attached to.  (The symptom seen in PostgreSQL is
that a backend attempting to execute CREATE DATABASE core-dumps.)  I would
love to know why there is a discrepancy between the published source and
the actual behavior --- tgl 7-Nov-2001.

Appropriate bug reports have been filed with Apple --- see 
Radar Bug#s 2767956, 2683531, 2805147.  One hopes we can retire this
kluge in the not too distant future.


As of PostgreSQL 7.3 and Mac OS X 10.1, one should expect warnings
like these while linking the backend:

/usr/bin/ld: warning unused multiple definitions of symbol _system
port/SUBSYS.o definition of _system in section (__TEXT,__text)
/usr/lib/libm.dylib(system.o) unused definition of _system

These are due to overriding system() per the above-described hack.