大家好, kill_fasync可以发送自己定义的数据吗 比如当有个u盘插入时 我就发个数字8给用户层。 具体怎么发呢 thx!
by shuangwen163 - 驱动开发 - 2010-11-30 19:46:44 阅读(2978) 回复(0)
kpp.c --------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define KPPMAJOR 240 #define MODULE_NAME "kpp" #define HOLD_IRQ MAGUS_GPIO_HOLD #define KPP_GET ...
#include linux/module.h> #include linux/init.h> #include linux/fs.h> #include linux/kdev_t.h> #include linux/cdev.h> #include linux/kernel.h> #include linux/string.h> #include asm/uaccess.h> #define DEVICE_NAME "chardev" static int chardev_open(struct inode *inodp, struct file *filp); static ssize_t chardev_read(struct file *filp, char __user *buff, size_t count, loff_t *f_pos); stati...
#killall -HUP inetd //让该服务重新读一次配置 # kill -9 pid //可以杀掉进程 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/28922/showart_336139.html
kill kill [options] [pids | commands] Send a signal to terminate one or more process IDs. You must own the process or be a privileged user. If no signal is specified, TERM is sent. This entry describes the /bin/kill command, which offers several powerful features. There are also built-in shell commands of the same name; the bash and ksh versions are described in Chapter 6. In particular, /bin/ki...
void input_handler() { char data[MAX_LEN]; int len; //读取并输出STDIN_FILENO上的输入 len = read(fd, &data, MAX_LEN); data[len] = 0; printf("input available:%s\n", data); } main() { int oflags; //启动信号驱动机制 fd=open("dev/chrdev",O_RDWR); signal(SIGIO, input_handler); fcntl(fd, F_SETOWN, getpid()); printf("a\n"); oflags = fcntl(STDIN_FILENO, F_GETFL); printf("b\n");...
coach factory outlet Skirt waist width waist gauge to two color contrast to the mainstream of this summer by freehand brushwork.Tie-in pearl necklace, put on the princess high-heeled shoes, stepping cheerful fi...