Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
john-tornblom committed Feb 4, 2024
1 parent 4dedf07 commit bbbfb6c
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions main.c
Expand Up @@ -36,7 +36,6 @@ typedef struct notify_request {


int sceKernelSendNotificationRequest(int, notify_request_t*, size_t, int);
int sceKernelSetProcessName(const char*);


static void
Expand Down Expand Up @@ -234,16 +233,10 @@ int
main() {
uint16_t port = 3232;

signal(SIGCHLD, SIG_IGN);
if(syscall(SYS_rfork, RFPROC | RFNOWAIT | RFCFDG)) {
return 0;
}

open("/dev/null", O_RDONLY); // stdin
open("/dev/console", O_WRONLY); // stdout
open("/dev/console", O_WRONLY); // stderr
syscall(SYS_thr_set_name, -1, "klogsrv.elf");
dup2(open("/dev/console", O_WRONLY), STDOUT_FILENO);
dup2(open("/dev/console", O_WRONLY), STDERR_FILENO);

sceKernelSetProcessName("klogsrv.elf");
while(1) {
serve_file("/dev/klog", port);
sleep(3);
Expand Down

0 comments on commit bbbfb6c

Please sign in to comment.