#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,如需转载请自行联系原作者
目录
相关文章
|
7月前
|
存储 负载均衡 前端开发
slb的Backend Server Group 或 BackendServer
slb的Backend Server Group 或 BackendServer
59 3
|
Kubernetes 容器 Perl
【kubernetes】解决: kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = faile...
【kubernetes】解决: kubelet Failed to create pod sandbox: rpc error: code = Unknown desc = faile...
11086 0
|
3月前
|
Unix Shell Linux
5-15|Docker报错OCI runtime exec failed: exec failed: unable to start container process: exec: “/bin/ba
5-15|Docker报错OCI runtime exec failed: exec failed: unable to start container process: exec: “/bin/ba
|
3月前
|
监控
{"level":"warn","ts":"2023-11-07T00:35:53.400+0800","caller":"etcdserver/server.go:2048",&
{"level":"warn","ts":"2023-11-07T00:35:53.400+0800","caller":"etcdserver/server.go:2048",&
|
6月前
|
Unix Docker 容器
使用docker 启动naocs 报错出现:standard_init_linux.go:241: exec user process caused "exec format error"
```markdown Error in Docker container startup: "standard_init_linux.go:241: exec user process caused \"exec format error\"". Occurred at 2024-06-29 09:26:19.910, followed by a failed hook with a syslog delivery error at 09:27:20.193. Seeking solutions from experts. ```
|
6月前
|
小程序
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)
150 4
|
7月前
|
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]
43 0
|
7月前
|
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
112 0
|
网络安全
错误集--NFS报错clnt_create: RPC: Port mapper failure - Unable to receive: errno 113 (No route to host)
错误集--NFS报错clnt_create: RPC: Port mapper failure - Unable to receive: errno 113 (No route to host)
1547 0
错误集--NFS报错clnt_create: RPC: Port mapper failure - Unable to receive: errno 113 (No route to host)