找回密码
 立即注册
查看: 93|回复: 0

娈电瑙璐存搴

[复制链接]
发表于 2023-8-26 21:50:40 | 显示全部楼层 |阅读模式
  1. //鍐欎竴娈电洃瑙嗗壀璐存澘鍐呭鐨勭▼搴#include <stdio.h>#include <string.h>#include <stdlib.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#include <sys/select.h>#include <sys/time.h>#include <sys/mman.h>#include <sys/wait.h>#include <errno.h>#include <signal.h>#include <pthread.h>#include <semaphore.h>int main(int argc, char *argv[]){    int fd = open("/dev/clipboard", O_RDONLY);    if(fd < 0)    {        perror("open");        return -1;    }    char buf[1024];    while(1)    {        memset(buf, 0, sizeof(buf));        read(fd, buf, sizeof(buf));        printf("%s\n", buf);        sleep(1000);    }    return 0;    }               
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|翻墙党

GMT+8, 2026-10-2 18:50 , Processed in 0.066829 second(s), 23 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表