mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-15 09:20:52 +08:00
29 lines
411 B
C
29 lines
411 B
C
|
#include "lib_acl.h"
|
||
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
#include <unistd.h>
|
||
|
#include "lib_fiber.h"
|
||
|
|
||
|
int main(void)
|
||
|
{
|
||
|
int ret;
|
||
|
char buf[8192];
|
||
|
|
||
|
//acl_sys_hook();
|
||
|
|
||
|
ret = read(0, buf, sizeof(buf) - 1);
|
||
|
|
||
|
if (ret <= 0) {
|
||
|
printf("read error\r\n");
|
||
|
return 1;
|
||
|
}
|
||
|
|
||
|
buf[ret] = 0;
|
||
|
printf("read: [%s]\r\n", buf);
|
||
|
|
||
|
write(1, buf, strlen(buf));
|
||
|
|
||
|
return 0;
|
||
|
}
|