#ifdef EXEC_BACKEND 用于何处

简介:
在PostgreSQL的源代码 postmaster.c 的BackendStartup 函数中,有如下的部分(中间部分省略):

#ifdef EXEC_BACKEND                                
    pid = backend_forkexec(port);                            
#else                            /* !EXEC_BACKEND */    
    pid = fork_process();    
        ....                        
#endif   /* EXEC_BACKEND */
对于 EXEC_BACKEND,进行调查发现:
configure脚本中有如下一段(包含 EXEC_BACKEND的只有此处):

# We already have this in Makefile.win32, but configure needs it too
if test "$PORTNAME" = "win32"; then
  CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32 -DEXEC_BACKEND"
fi
由此可知,仅当编译/运行平台为windows系列时,才有可能定义 EXEC_BACKEND。
故此处执行的是 fork_process() 函数







本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/archive/2012/07/19/2598959.html,如需转载请自行联系原作者
目录
相关文章
|
2月前
|
网络协议 Linux 网络安全
weavescope curl -L git.io/scope -o /usr/local/xx failed to connect to 2001: Network is unreachable
weavescope curl -L git.io/scope -o /usr/local/xx failed to connect to 2001: Network is unreachable
|
21天前
|
小程序
Failed to load local image resource Xx the server responded with a status of of 500 (HTTP/1.1 500)
Failed to load local image resource Xx the server responded with a status of of 500 (HTTP/1.1 500)
|
2月前
|
Shell Perl 容器
kubectl exec -it etcd-master -n kube-system /bin/bashkubectl exec [POD] [COMMAND]
kubectl exec -it etcd-master -n kube-system /bin/bashkubectl exec [POD] [COMMAND]
23 0
|
2月前
|
Kubernetes 容器 Perl
error: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is cu
error: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: the server is cu
45 0
|
SQL 分布式计算 安全
jps查看进程出现「xxxx -- process information unavailable」
jps查看进程出现「xxxx -- process information unavailable」
1253 0
jps查看进程出现「xxxx -- process information unavailable」
|
NoSQL MongoDB 数据安全/隐私保护
OCI runtime exec failed: exec failed: unable to start container process: exec: "mongo": executable file not found in $PATH: unknown
OCI runtime exec failed: exec failed: unable to start container process: exec: "mongo": executable file not found in $PATH: unknown
1010 0
OCI runtime exec failed: exec failed: unable to start container process: exec: "mongo": executable file not found in $PATH: unknown
|
Ubuntu Linux 应用服务中间件
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "ip": executable file not found in $PATH: unknown (Docker容器没有ip addr命令:exec ip addr 报错)
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "ip": executable file not found in $PATH: unknown (Docker容器没有ip addr命令:exec ip addr 报错)
3530 0