mirror of
https://github.com/Hizenberg469/Driver-tutorial.git
synced 2026-04-20 00:42:25 +03:00
Character driver finished
This commit is contained in:
@@ -20,7 +20,7 @@ int main(){
|
||||
FD_ZERO(&read_set);
|
||||
FD_SET(fd1, &read_set);
|
||||
FD_SET(fd2, &read_set);
|
||||
|
||||
|
||||
n = select(FD_SETSIZE, &read_set, NULL, NULL, &timeout);
|
||||
if( n < 0 ){
|
||||
perror("select ");
|
||||
@@ -40,6 +40,9 @@ int main(){
|
||||
n = read(fd2, buf, 10);
|
||||
printf(" read data = %s from ptwo \n", buf);
|
||||
}
|
||||
|
||||
// close(fd1);
|
||||
// close(fd2);
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user