[fpc-pascal] errno codes fpOpen
afpTeam
afpteam at sbcglobal.net
Thu Nov 8 20:43:18 CET 2007
Hi,
I'm maybe lost in the doc searches, but is there a reference explaining the
extended err codes for fpOpen and friends?
I could not find one.
The effort is a Linux/Pentium fifo read by cgi but fails to read a piped
fifo built with RW permission / shared.
cgi:
Program pipe_read;
uses BaseUnix,Unix;
var FD: Cint;
s:string[255];
begin
writeln ('Content-type: text/html');
writeln;
FD:=fpOpen ('/tmp/BlaBla,O_RdOnly or O_NonBlock);
writeln ('start...');
if FD>=0 then
begin
fpread(FD,s,255);
writeln(s);
end
else
Writeln ('Error : ',fpgeterrno);
Writeln ('The script exited with status : ',fpClose (FD));
writeln ('done');
end.
Results...
FpMkfifo : -1<- setup fifo pipe,ok
start...3(handle to pipe)
PID > 0<-server returned
The script exited with status : 0
Thanks,
Mike
More information about the fpc-pascal
mailing list