6 The file system.c included herein is taken directly from Apple's Darwin
7 open-source CVS archives, and is redistributed under the BSD copyright
8 notice it bears. (According to Apple's CVS logs, their version is
9 identical to the FreeBSD original.) It provides our own implementation of
10 the system(3) function, which ought by all rights to be identical to the
11 one provided in libc on Darwin machines. Nonetheless, this version works,
12 whereas the one that actually ships with Mac OS X 10.1 doesn't. The
13 shipped version appears to disconnect the calling process from any shared
14 memory segments it is attached to. (The symptom seen in PostgreSQL is
15 that a backend attempting to execute CREATE DATABASE core-dumps.) I would
16 love to know why there is a discrepancy between the published source and
17 the actual behavior --- tgl 7-Nov-2001.
19 Appropriate bug reports have been filed with Apple --- see
20 Radar Bug#s 2767956, 2683531, 2805147. One hopes we can retire this
21 kluge in the not too distant future.
24 As of PostgreSQL 7.3 and Mac OS X 10.1, one should expect warnings
25 like these while linking the backend:
27 /usr/bin/ld: warning unused multiple definitions of symbol _system
28 port/SUBSYS.o definition of _system in section (__TEXT,__text)
29 /usr/lib/libm.dylib(system.o) unused definition of _system
31 These are due to overriding system() per the above-described hack.
34 The bug appears to be repaired in OS X 10.2.6 and later (possibly in
35 earlier 10.2.* as well, but no systems handy to check). We #ifdef out
36 the substitute system() definition on 10.3 and later.