@@ -20,6 +20,7 @@ import (
2020)
2121
2222var unmount = syscall .Unmount
23+ var commandWithCtx = exec .CommandContext
2324
2425var ErrTimeoutWaitProcess = errors .New ("timeout waiting for process to end" )
2526
@@ -38,7 +39,7 @@ func (su *MounterOptsUtils) FuseMount(path string, comm string, args []string) e
3839 ctx , cancel := context .WithCancel (context .Background ())
3940 defer cancel ()
4041
41- cmd := exec . CommandContext (ctx , comm , args ... )
42+ cmd := commandWithCtx (ctx , comm , args ... )
4243 err := cmd .Start ()
4344 if err != nil {
4445 klog .Errorf ("FuseMount: command start failed: mounter=%s, args=%v, error=%v" , comm , args , err )
@@ -162,9 +163,9 @@ func isMountpoint(pathname string) (bool, error) {
162163 return false , nil
163164}
164165
165- func waitForMount (ctx context.Context , path string , initialDelaySeconds , timeout time.Duration ) error {
166- if initialDelaySeconds > 0 {
167- time .Sleep (initialDelaySeconds )
166+ func waitForMount (ctx context.Context , path string , initialDelay , timeout time.Duration ) error {
167+ if initialDelay > 0 {
168+ time .Sleep (initialDelay )
168169 }
169170 var elapsed time.Duration
170171 attempt := 1
0 commit comments