mirror of
https://github.com/Karmaz95/Snake_Apple.git
synced 2026-11-26 01:43:24 +01:00
Article: Exceptions on macOS
This commit is contained in:
1 parent
c956294ec7
commit
1bc13f6fbe
3 files changed
+16
No files matched your search
@@ -0,0 +1,8 @@
|
||||
#include <mach/mach.h>
|
||||
|
||||
int main() {
|
||||
mach_port_t port;
|
||||
mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &port);
|
||||
return 0; // Port allocation directly interacts with kernelspace
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#include <unistd.h>
|
||||
|
||||
int main() {
|
||||
const char *message = "Hello, Kernelspace!\n";
|
||||
write(1, message, 20); // Direct system call to write to stdout
|
||||
return 0;
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 404 KiB |
Reference in new issue
Block a user