mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
Implement argc/argv support for spawned tasks.
Celebrate the new functionality with a simple /bin/cat implementation. :^)
This commit is contained in:
parent
53abfa7ea1
commit
df87dda63c
13 changed files with 105 additions and 17 deletions
|
@ -8,9 +8,12 @@ extern "C" int _start()
|
|||
{
|
||||
errno = 0;
|
||||
|
||||
// FIXME: Pass appropriate argc/argv.
|
||||
int status = main(0, nullptr);
|
||||
|
||||
int argc;
|
||||
char** argv;
|
||||
int rc = Syscall::invoke(Syscall::GetArguments, (dword)&argc, (dword)&argv);
|
||||
int status = 254;
|
||||
if (rc == 0)
|
||||
status = main(argc, argv);
|
||||
Syscall::invoke(Syscall::PosixExit, status);
|
||||
|
||||
// Birger's birthday <3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue