Skip to content

Commit 2cba526

Browse files
weizhe0422innobead
authored andcommitted
fix: replace PPID to using PID to get initial process
Signed-off-by: Ray Chang <ray.chang@suse.com>
1 parent 640be93 commit 2cba526

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/server/nfs/nfs_server.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func getUpdatedGaneshConfig(config []byte) []byte {
151151
logPath string
152152
)
153153

154-
if os.Getppid() == 1 {
154+
if os.Getpid() == 1 {
155155
logPath = "/proc/1/fd/1"
156156
} else {
157157
logPath = "/tmp/ganesha.log"
@@ -164,5 +164,6 @@ func getUpdatedGaneshConfig(config []byte) []byte {
164164
}
165165

166166
template.Must(template.New("Ganesha_Config").Parse(string(config))).Execute(&tmplBuf, tmplVals)
167+
167168
return tmplBuf.Bytes()
168169
}

0 commit comments

Comments
 (0)