home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
341b.lha
/
uucp1_v1.03d
/
man
/
UUSer.pp
/
UUSer
Wrap
Text File
|
1990-02-10
|
1KB
|
53 lines
NAME
UUser (AmigaDOS Handler)
SYNOPSIS
Mount uuser:
Open Format: uuser:devicename/unit/options
Example: uuser:serial.device/0/R1000
DESCRIPTION
Options: Rn Set read timeout when no data available (millisecs)
C0 Ignore carrier detect
The UUSER: handler allows arbitrary programs to talk to any
serial.device and unit uses Read() and Write() calls.
Consequently, stdio may be used as well.
UUSER: IS NORMALLY SETUP BY GETTY WHEN IT RUNS A PROGRAM. See
GETTY.MAN for more info. Essentially, if a '*' appears before
the command-to-run in the passwd file Getty will setup UUSER:
on the stdin and stdout of the command it runs after a valid
login sequence.
DIFFERENCES FROM NORMAL HANDLERS:
To avoid a gets() or getc() or read() or Read() (or whatever
call you use to read data from stdin), UUSER: times out after
1 second if no characters have been received.
If you are using stdio, you get an EOF when this occurs. You
can clear the EOF state by calling clrerr(stdin).
UUSER: will return immediately when at least one character is
ready. Thus, if you do:
n = read(0, Buf, 256)
n will return:
-1 = Lost Carrier
0 = Timeout (loop retry?)
1-256 = Anywhere from 1 to 256 bytes have been recevied
UUSER: checks carrier and if it detects carrier is lost, will
return an error for both read and write calls.
If using stdio for writing, be sure to call fflush(stdout) when
you want to flush stdio's buffer to the serial port.