1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-29 07:15:08 +00:00

Finally unbreak the colonel process and make it the true idle process.

This commit is contained in:
Andreas Kling 2018-11-07 23:13:38 +01:00
parent 440029c9d1
commit 43f40a3050
4 changed files with 59 additions and 52 deletions

View file

@ -321,8 +321,12 @@ int Process::exec(const String& path, Vector<String>&& arguments, Vector<String>
kprintf("Process %u (%s) exec'd %s @ %p\n", pid(), name().characters(), path.characters(), m_tss.eip);
#endif
if (current == this)
Scheduler::yield();
set_state(ExecPhase1);
if (current == this) {
bool success = Scheduler::yield();
ASSERT(success);
}
return 0;
}
@ -361,7 +365,7 @@ int Process::sys$execve(const char* filename, const char** argv, const char** en
}
int rc = exec(path, move(arguments), move(environment));
ASSERT(rc < 0);
ASSERT(rc < 0); // We should never continue after a successful exec!
return rc;
}