Skip to content

Commit

Permalink
fix: replace PPID to using PID to get initial process
Browse files Browse the repository at this point in the history
Signed-off-by: Ray Chang <ray.chang@suse.com>
  • Loading branch information
weizhe0422 authored and innobead committed Aug 25, 2022
1 parent 640be93 commit 2cba526
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/server/nfs/nfs_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func getUpdatedGaneshConfig(config []byte) []byte {
logPath string
)

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

template.Must(template.New("Ganesha_Config").Parse(string(config))).Execute(&tmplBuf, tmplVals)

return tmplBuf.Bytes()
}

0 comments on commit 2cba526

Please sign in to comment.