1
0
mirror of https://github.com/ioacademy-jikim/android_framwork synced 2025-06-07 16:06:29 +00:00
android_framwork/01_day/InitKernelLogging.c
ioacademy-jikim 22beff8dbe 1
2018-06-14 09:32:50 +09:00

18 lines
259 B
C

#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
int main()
{
int fd = open("__null__", O_RDWR);
dup2(fd, 0);
dup2(fd, 1);
dup2(fd, 2);
if (fd > 2) close(fd);
printf("hello world\n");
return 0;
}