sync: rename procResume -> procHooksDone

The old name was quite confusing, and with the addition of the
procMountPlease sync message there are now multiple sync messages that
are related to "resuming" runc-init.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This commit is contained in:
Aleksa Sarai
2023-08-17 15:13:33 +10:00
committed by lifubang
parent f235fa6763
commit ccc76713a7
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -413,7 +413,7 @@ func syncParentHooks(pipe *os.File) error {
return err return err
} }
// Wait for parent to give the all-clear. // Wait for parent to give the all-clear.
return readSync(pipe, procResume) return readSync(pipe, procHooksDone)
} }
// syncParentSeccomp sends the fd associated with the seccomp file descriptor // syncParentSeccomp sends the fd associated with the seccomp file descriptor
+1 -1
View File
@@ -568,7 +568,7 @@ func (p *initProcess) start() (retErr error) {
} }
} }
// Sync with child. // Sync with child.
if err := writeSync(p.messageSockPair.parent, procResume); err != nil { if err := writeSync(p.messageSockPair.parent, procHooksDone); err != nil {
return err return err
} }
default: default:
+2 -2
View File
@@ -23,7 +23,7 @@ type syncType string
// --- no return synchronisation // --- no return synchronisation
// //
// procHooks --> [run hooks] // procHooks --> [run hooks]
// <-- procResume // <-- procHooksDone
// //
// procReady --> [final setup] // procReady --> [final setup]
// <-- procRun // <-- procRun
@@ -35,7 +35,7 @@ const (
procReady syncType = "procReady" procReady syncType = "procReady"
procRun syncType = "procRun" procRun syncType = "procRun"
procHooks syncType = "procHooks" procHooks syncType = "procHooks"
procResume syncType = "procResume" procHooksDone syncType = "procHooksDone"
procSeccomp syncType = "procSeccomp" procSeccomp syncType = "procSeccomp"
procSeccompDone syncType = "procSeccompDone" procSeccompDone syncType = "procSeccompDone"
) )