commit 2349c67e2279bfba328afc017657e8c9546ed098
parent dfcb33c94086296d35091a125df999bf3e008eaf
Author: Drew DeVault <sir@cmpwn.com>
Date: Fri, 12 Mar 2021 08:45:30 -0500
os::exec: mark exec as @noreturn
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/os/exec/cmd.ha b/os/exec/cmd.ha
@@ -45,9 +45,10 @@ export fn finish(cmd: *command) void = {
// Executes a prepared command in the current address space, overwriting the
// running process with the new command.
-export fn exec(cmd: *command) error = {
+export @noreturn fn exec(cmd: *command) void = {
defer finish(cmd); // Note: doesn't happen if exec succeeds
- return platform_exec(cmd);
+ platform_exec(cmd);
+ abort("os::exec::exec failed");
};
// Starts a prepared command in a new process.