[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

fd / fcntl / ioctl mm



Hej

Jag har några frågor som jag inte har hittat lösningen på. 

1. Jag har en pipe som jag läse "icke blockerande" ifrån. Jag vill att den
skall blockera till tecken 3 kommer. Detta kan man ju göra när man öppnar
en fd genom att sätt ICANON och lite andra termios saker. 
Om jag får en pipe, hur ändrar jag då den så att den får rätt
beteende. Detta går ju att göra med fcntl/ioctl men jag vet inte vilka
flaggor jag skall anropa med. Jag vet inte heller var jag skall hitta
information om dessa. Någon som vet och är villig att hjälpa?

2. Om man har ett modem. Kan man och vill kolla om det finns en bärvåg
(CARRIER DETECTED eller CD) tycker jag att man borde gör något liknande:

ioctl(fd, TIOCMODG, &temp);  // Getting modemreg.
if((temp & TIOCM_CAR) == TIOCM_CAR){
	// Carrier detected
} else {
	// No carrier
}

Men detta fungerar inte. Några förslag?

mvh
 Martin Bertilsson Haagen
 sslug@sslug



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *