X + Slackware3.5

Christos Ricudis ricudis at paiko.gr
Sun Nov 1 13:18:08 EET 1998


Hello Linux-greek-users!

  On 01 Nov 98, Linux-greek-users wrote to All with subject "X +
Slackware3.5":

Kata prosfilh moy synh8eia, apantaw stis asxetes erwthseis :>

 L> Ps3. Poies oi diafores metaksy toy ttySX & toy cuaX?

H diafora egkeitai sto pws ginetai to locking otan xrhsimopoieis dial-in
kai dial-out devices (p.x. trexei ena getty sth seiriakh kai 8eleis na
thn anoikseis gia na kaneis dial). Ta problhmata einai dyo: Pws 8a
apofygei to getty na "apanthsei" thn klhsh an esy ekeinh thn wra
xrhsimopoieis to port, kai pws 8a apofygei to programma epikoinwnias sou
na anoiksei ena port sto opoio ginetai hdh mia eiserxomenh klhsh.

Yparxoun dyo me8odoi :

1) H paradosiakh me8odos: To modem einai se auto-answer mode. To getty
anoigei to /dev/ttySx, to opoio kanei block mexri na dei carrier detect
sto port. Ean anixneysei carrier KAI to /dev/cuax DEN einai anoixto, h
open() epistrefei sto getty kai to getty synexizei parousiazontas to
login: ktl ktl. Me to poy teleiwsei h klhsh, stelnetai ena SIGHUP sto
getty, to opoio kleinei thn porta rixnontas to carrier, kai epanalambanei
th diadikasia apo thn arxh. Gia na kaneis ekserxomenh klhsh, anoigeis to
/dev/cuax. An kapoio allo process exei hdh anoixto to /dev/ttySx, h
open() apotygxanei kai epistrefei error.

2) H POSIX me8odos: To programma poy 8elei na kanei ekserxomenh klhsh
prwta koitazei na dei an yparxei to arxeio /var/lock/LCK..ttySx. An
yparxei, to programma dhlwnei oti h 8yra einai kateilhmmenh, kai stamata,
alliws dhmioyrgei ena arxeio /var/lock/LCK..ttySx, anoigei to /dev/ttySx
se nonblocking mode, kai kanei th douleia toy. To getty twra, anoigei to
/dev/ttyS0 se non-blocking mode (O_NONBLOCK) kai me mia select() akouei
sthn porta. Me to poy erxetai enas eiserxomenos xarakthras koitazei na
dei an yparxei to arxeio /var/lock/LCK..ttySx. Ean yparxei, stamata -
dioti o xarakthras proorizotan gia allo programma. Ean den yparxei,
dhmioyrgei ena /var/lock/LCK..ttySx kai synexizei me to login: ktl ktl
ktl. Opoio programma anoigei to lock file, diabazei apo mesa to PID toy
process poy to dhmioyrghse. An den yparxei ayto to process, to lock
8ewreitai stale kai akyrwnetai. Opoio programma dhmioyrgei to lock file,
grafei mesa to PID toy eaytoy tou.

H prwth me8odos teinei na egkataleif8ei epeidh einai problhmatikh - syn
twn allwn den se profylassei apo thn periptwsh na anoiksoyn dyo
programmata taytoxrona to /dev/cuax. Se kapoio mellontiko kernel ta
/dev/cuax devices 8a eksafanistoyn teleiws (hdh ston 2.1 otan anoikseis
ena /dev/cuax device trws sth mapa ena kernel warning). Eksakoloy8oyn na
yparxoyn mono kai mono epeidh merikoi hli8ioi blammenoi distributors toy
linux, poy h monh fora poy akousan UNIX prin apo to linux htan sth leksh
UNIseX, dhmioyrgoyn links toy styl /dev/modem -> /dev/cua0.

Symperasma : <bold>MHN xrhsimopoieite POTE ta /dev/cuax devices, alla
PANTA ta /dev/ttySx devices, se syndiasmo - opou xreiazetai - me POSIX
locking</bold>

 L> Ps4. BTW eixa parei to Infomagic Aug'97 kai eixe ta archives apo
 L>      megala ftp sites kai m'arese. Twra omws tou Jun'98 den ta
 L>      exei. Ti egine? Giati den ta ksanadinoun?

To Linux Developer's Resource apo 6 cdia egine 10 kai twra to poylane
se dyo ksexwrista set - to ena me 6 cdia exei mono distributions, kai to 
allo me 4 CDia exei ta ftp site mirrors. Profanws to kanane epeidh de 
xwrousane pia alla CDia mesa sto kouti :>. 

Twra, poso kairo 8a kanei o Papaswthriou gia na to katalabei kai na ta ferei
kai ta dyo....

--
Christos Ricudis
"Windows has detected that a gnat has farted near your computer. Press any
 key to reboot". - anonymous in ASR. 	
--
====================================================================
Gia boithia (h na diagrafhte) e-mail sto majordomo at argos.hol.gr
Ta archives tis listas einai sto http://www.argos.hol.gr/lists :
prin steilete kapoia erothsh psakte mipos exei hdh apanththei.
Gia opoiodipote problima stilte e-mail ston owner-linux-greek-users
====================================================================



More information about the Linux-greek-users mailing list