Egor00fandBurer d486c6b33a libc.obj: update exit (#340)
## New functions:
+ implement `_exit`/`_Exit`.
+ implement `atexit`.
+ implement `abort`.
`abort` write `Aborted pid: %d` to debug board

## Changes:

### call `exit` after main.
Just calling `exit`

### `exit` write exit code
If exit code isn't 0 `exit` will write exit code to debug board.

### use `con_exit(0)`
use
```c
con_exit(0)
```
instead of
```c
con_exit(status);
```
[from console.obj readme](310999dcc4/programs/develop/libraries/console_coff/console_en.txt (L15)).
I think the console window shouldn't be so dependent on the exit code. It's must only always close or always stay on screen

### `exit` writing exit code to debug board
Since the exit code is not used anywhere right now, I think it's better to just show it on the debug board.

for auto rebuild `crt0.o` need #339

from #311

---------

Co-authored-by: Burer <burer@kolibrios.org>
Reviewed-on: KolibriOS/kolibrios#340
Reviewed-by: Mikhail Frolov <mixa.frolov2003@gmail.com>
Reviewed-by: Burer <burer@kolibrios.org>
Co-authored-by: Egor00f <y.yarin@inbox.ru>
Co-committed-by: Egor00f <y.yarin@inbox.ru>
2026-05-19 10:30:46 +00:00
2026-05-17 11:53:45 +00:00
2026-05-19 10:30:46 +00:00
2024-05-21 18:04:56 +00:00
2026-02-21 19:22:11 +00:00
2024-07-11 09:00:28 +01:00

KolibriOS

License Build system

KolibriOS is a hobby operating system for x86-compatible computers, which is currently being developed by a small but passionate team of enthusiasts.

Its kernel, most drivers, and many programs are written entirely in FASM assembly language, making them very compact and lean on system resources.

Based on MenuetOS, it uses its own standards and is NOT fully POSIX or UNIX compliant.

Website

Visit the official KolibriOS website for more information, downloads, and documentation.

Contributing

We would appreciate any participation in the project and always welcome new users and contributors.

Detailed instructions for the contribution process can be found in the contributing guide.

Common list of tasks, issues and enhancement proposals can be found on this page.

Special thanks

The KolibriOS team expresses special thanks to the author of the 32-bit MenuetOS, Ville Turjanmaa. We also want to note that all MenuetOS copyrights have been preserved.

S
Description
The main KolibriOS repository
Readme
281 MiB
0 Stars 1 Watchers 0 Forks
Languages
C 71.2%
Assembly 12.5%
C++ 10.6%
Makefile 1.7%
HTML 1.2%
Other 2.2%