摘要:
http://www.cnblogs.com/processakai/archive/2012/04/11/2442294.html今天看书看到了关于alarm的一些用法,自己有在网上找了些资料看了下;1。alarm()执行后,进程将继续执行,在后期(alarm以后)的执行过程中将会在seconds秒后收到信号SIGALRM并执行其处理函数。#include #include #include void sigalrm_fn(int sig){ printf("alarm!\n"); alarm(2); return;}int main(void){ signal(SIGA
阅读全文
摘要:
http://blog.csdn.net/againyuan/article/details/3905380linux串口termiosNAMEtermios, tcgetattr, tcsetattr, tcsendbreak, tcdrain, tcflush, tcflow, cfmakeraw, cfgetospeed, cfgetispeed, cfsetispeed, cfsetospeed -获取和设置终端属性,行控制,获取和设置波特率SYNOPSIS总览#include #include int tcgetattr(intfd, struct termios *termios_
阅读全文
摘要:
http://bbs.csdn.net/topics/340184140/*************************************************************************************tty_open_port()openthettyport************************************************************************************/inttty_open_port(constchar*dev_name){intfd;/*Filedescriptorforth
阅读全文