libc.obj: update exit #340

Open
Egor00f wants to merge 5 commits from Egor00f/kolibrios:libc.ob--update-exit into main
Contributor

for auto rebuild crt0.o need #339

from #311

for auto rebuild `crt0.o` need #339 from #311
Egor00f added 1 commit 2026-02-22 08:36:31 +00:00
libc.obj: add call exit after main && translate crt0.asm and convert it to UTF-8
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 1m16s
Build system / Build (pull_request) Successful in 9m3s
0319a2d7cb
Egor00f added 1 commit 2026-02-22 08:56:27 +00:00
libc.obj: add atexit and normal exit. add exit code save/read
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 20s
Build system / Build (pull_request) Successful in 16m18s
ba8747e2ab
Egor00f added 1 commit 2026-02-22 09:03:20 +00:00
libc.obj: add abort && add exit and _exit to stdlib.h and libc.def
Some checks failed
Build system / Build (pull_request) Failing after 2s
Build system / Check kernel codestyle (pull_request) Successful in 24s
f675fd31b7
Egor00f requested review from mxlgv 2026-02-22 09:03:38 +00:00
Egor00f added 1 commit 2026-02-22 09:07:39 +00:00
libc.obj: add atexit test
Some checks failed
Build system / Build (pull_request) Failing after 2s
Build system / Check kernel codestyle (pull_request) Successful in 23s
275401c06a
mxlgv requested changes 2026-02-23 22:51:23 +00:00
@@ -0,0 +1,18 @@
#include <stdlib.h>
Owner

Please add copyright:

/*
* SPDX-License-Identifier: GPL-2.0-only
* Copyright (C) 2026 KolibriOS team
*/
Please add copyright: ```c /* * SPDX-License-Identifier: GPL-2.0-only * Copyright (C) 2026 KolibriOS team */ ```
@@ -56,2 +57,2 @@
jz @f ;загружены кавычки
mov dh, ch ;параметр без кавычек
jz @f ; quotes loaded
mov dh, ch ; parameter without quotes
Owner

Please fix indent

Please fix indent
@@ -0,0 +1,29 @@
#include <conio.h>
Owner

Please add copyright:

/*
* SPDX-License-Identifier: GPL-2.0-only
* Copyright (C) 2026 KolibriOS team
*/
Please add copyright: ```c /* * SPDX-License-Identifier: GPL-2.0-only * Copyright (C) 2026 KolibriOS team */ ```
@@ -0,0 +1,69 @@
#ifndef __STDLIB_EXIT_H__
Owner

It's actually super redundant. I assume that this serves some purpose, but in native code it is unnecessary.

It's actually super redundant. I assume that this serves some purpose, but in native code it is unnecessary.
Author
Contributor

I add it for system(). now i thnink will be better add it later.

I add it for `system()`. now i thnink will be better add it later.
Owner

I suspect this is redundant. I saw the code for system() in the recent PR. You don't have to wait there for the shell to close; you can call shell exit and it will close immediately.

In fact, in KolibriOS there are no exit codes, what you are trying to do looks like a dirty hack.

I suspect this is redundant. I saw the code for `system()` in the recent PR. You don't have to wait there for the shell to close; you can call `shell exit` and it will close immediately. In fact, in KolibriOS there are no exit codes, what you are trying to do looks like a dirty hack.
Author
Contributor

Okay, I'll just delete this. I'll think about it later.

Okay, I'll just delete this. I'll think about it later.
@@ -0,0 +1,12 @@
#include <stdio.h>
Owner

Please add copyright:

/*
* SPDX-License-Identifier: GPL-2.0-only
* Copyright (C) 2026 KolibriOS team
*/
Please add copyright: ```c /* * SPDX-License-Identifier: GPL-2.0-only * Copyright (C) 2026 KolibriOS team */ ```
@@ -0,0 +1,35 @@
#include <stdlib.h>
Owner

Please add copyright:

/*
* SPDX-License-Identifier: GPL-2.0-only
* Copyright (C) 2026 KolibriOS team
*/
Please add copyright: ```c /* * SPDX-License-Identifier: GPL-2.0-only * Copyright (C) 2026 KolibriOS team */ ```
@@ -1,12 +1,25 @@
/* Copyright (C) 2021 Logaev Maxim (turbocat2001), GPLv2 */
Owner

Please udate copyright:

/*
* SPDX-License-Identifier: GPL-2.0-only
* Copyright (C) 2021 Logaev Maxim
* Copyright (C) 2026 KolibriOS team
*/
Please udate copyright: ```c /* * SPDX-License-Identifier: GPL-2.0-only * Copyright (C) 2021 Logaev Maxim * Copyright (C) 2026 KolibriOS team */ ```
@@ -4,1 +4,4 @@
#include <sys/ksys.h>
#include "_exit.h"
static void __close_all()
Owner

TCC does not optimize the codegen. Comment out and write TODO.

TCC does not optimize the codegen. Comment out and write TODO.
mxlgv added a new dependency 2026-02-24 00:02:05 +00:00
Egor00f added 1 commit 2026-03-07 16:52:15 +00:00
libc.obj: add copyright & delete _exit.h & fix tabs in crt0.asm
Some checks failed
Build system / Check kernel codestyle (pull_request) Successful in 25s
Build system / Build (pull_request) Failing after 1m6s
aa619aa602
Author
Contributor

Hmm... maybe it would be better to declare _exit with #define?

Hmm... maybe it would be better to declare `_exit` with `#define`?
Egor00f requested review from mxlgv 2026-03-07 18:52:27 +00:00
Some checks failed
Build system / Check kernel codestyle (pull_request) Successful in 25s
Required
Details
Build system / Build (pull_request) Failing after 1m6s
Required
Details
This pull request doesn't have enough required approvals yet. 0 of 2 official approvals granted.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u libc.ob--update-exit:Egor00f-libc.ob--update-exit
git checkout Egor00f-libc.ob--update-exit
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Depends on
Reference: KolibriOS/kolibrios#340