mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 10:17:35 +00:00
Implement errno in LibC.
This also meant I had to implement BSS (SHT_NOBITS) sections in ELFLoader. I also added an strerror() so we can print out what the errors are.
This commit is contained in:
parent
434b6a8688
commit
260b14e505
14 changed files with 209 additions and 27 deletions
|
@ -1,11 +1,13 @@
|
|||
#include "process.h"
|
||||
#include "errno.h"
|
||||
#include <Kernel/Syscall.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
int spawn(const char* path)
|
||||
{
|
||||
return Syscall::invoke(Syscall::Spawn, (dword)path);
|
||||
int rc = Syscall::invoke(Syscall::Spawn, (dword)path);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue