我windows的一个文件夹共享到linux下 然后写了一个如下的cpp#include <stdio.h>
#include <unistd.h>
#include <sys/epoll.h>int main(void)
{
int epfd,nfds;
epfd = epoll_create(1);
ev.data.fd = STDIN_FILENO;
ev.events = EPOLLIN|EPOLLET;
epoll_ctl(epfd, EPOLL_CTL_ADD, STDIN_FILENO, &ev);
for(;;)
{
nfds = epoll_wait(epfd, events, 5, -1);
for(int i = 0; i < nfds; i++)
{
if(events[i].data.fd==STDIN_FILENO)
printf("welcome to epoll's word!\n"); }
}
}然后我用cat -v 却出现
int main(void)$
{$
int epfd,nfds;$
^Istruct epoll_event ev,events[5]; $
M-!M-!M-!M-!epfd = epoll_create(1); $
M-!M-!M-!M-!ev.data.fd = STDIN_FILENO;$
M-!M-!M-!M-!ev.events = EPOLLIN|EPOLLET; $
M-!M-!M-!M-!epoll_ctl(epfd, EPOLL_CTL_ADD, STDIN_FILENO, &ev); $
M-!M-!M-!M-!for(;;)$
M-!M-!M-!M-!{$
M-!M-!M-!M-!M-!M-!M-!M-!nfds = epoll_wait(epfd, events, 5, -1);$
M-!M-!M-!M-!M-!M-!M-!M-!for(int i = 0; i < nfds; i++)$
M-!M-!M-!M-!M-!M-!M-!M-!{$
M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!if(events[i].data.fd==STDIN_FILENO)$
M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!printf("welcome to epoll's word!\n");$
$
M-!M-!M-!M-!M-!M-!M-!M-!}$
M-!M-!M-!M-!}$
}$求教这是什么情况 不应该是^M么
#include <unistd.h>
#include <sys/epoll.h>int main(void)
{
int epfd,nfds;
epfd = epoll_create(1);
ev.data.fd = STDIN_FILENO;
ev.events = EPOLLIN|EPOLLET;
epoll_ctl(epfd, EPOLL_CTL_ADD, STDIN_FILENO, &ev);
for(;;)
{
nfds = epoll_wait(epfd, events, 5, -1);
for(int i = 0; i < nfds; i++)
{
if(events[i].data.fd==STDIN_FILENO)
printf("welcome to epoll's word!\n"); }
}
}然后我用cat -v 却出现
int main(void)$
{$
int epfd,nfds;$
^Istruct epoll_event ev,events[5]; $
M-!M-!M-!M-!epfd = epoll_create(1); $
M-!M-!M-!M-!ev.data.fd = STDIN_FILENO;$
M-!M-!M-!M-!ev.events = EPOLLIN|EPOLLET; $
M-!M-!M-!M-!epoll_ctl(epfd, EPOLL_CTL_ADD, STDIN_FILENO, &ev); $
M-!M-!M-!M-!for(;;)$
M-!M-!M-!M-!{$
M-!M-!M-!M-!M-!M-!M-!M-!nfds = epoll_wait(epfd, events, 5, -1);$
M-!M-!M-!M-!M-!M-!M-!M-!for(int i = 0; i < nfds; i++)$
M-!M-!M-!M-!M-!M-!M-!M-!{$
M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!if(events[i].data.fd==STDIN_FILENO)$
M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!M-!printf("welcome to epoll's word!\n");$
$
M-!M-!M-!M-!M-!M-!M-!M-!}$
M-!M-!M-!M-!}$
}$求教这是什么情况 不应该是^M么
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货