mirror of
https://github.com/Karmaz95/Snake_Apple.git
synced 2026-05-15 16:47:58 +02:00
Article: Exceptions on macOS
This commit is contained in:
@@ -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