libc - access violation lazarus / 1-Linux ---------------------------------------------------------------------- anthony · 2008-08-04 10:23 I have a simple minimal program. Compiling OK but running as root produces the error access violation. Compiling the same program with Kylix and then running is OK. Can you give me a hint? Code: [Select] Program p_tcsetattr; {$mode delphi} Uses    SysUtils, LibC; Var     FComHdl : Integer;         IOS     : TTermIOS; Begin    Try FComHdl := Libc.open ('/dev/ttyS0', O_RDWR Or O_SYNC);        WriteLn   (FComHdl);                       // prints : 3        tcgetattr (FComHdl, IOS);        tcsetattr (FComHdl, TCSADRAIN, IOS);       // as root : access violation    Except       On E : Exception Do WriteLn  ('Exception : ' + E.Message);    End; End.         thanks ---------------------------------------------------------------------- anthony · 2008-08-04 11:49 answer found in 2004 see http://www.lazarus.freepascal.org/index.php?name=PNphpBB2&file=viewtop ic&t=292&start=0&postdays=0&postorder=asc&highlight=tcsetattr