bug ipcctl()
Original Reporter info from Mantis: Alex_Lutovinin
-
Reporter name:
Original Reporter info from Mantis: Alex_Lutovinin
- Reporter name:
Description:
Incorrect result of performance semctl () at performance IPC_STAT.
The incorrect work is checked up on the versions 2.2.2 and 2.2.5. On the version 2.2.0 of a bug is not present.
Example:
uses SysUtils, ipc;
var semID, key, sresult: LongInt;
Buf: array[0..255] of Byte;
opts: TSEMun;
semds: TSEMid_ds;
begin
Key:= ftok(StrPCopy(@Buf, ParamStr(0)), 3);
Writeln('key=', Key);
if Key = -1 then Exit;
semID:= semget(key, 1, IPC_CREAT);
Writeln('semID=', semID); // ok
if semID = -1 then Exit;
opts.buf:= @semds;
sresult:= semctl(semID, 0, IPC_STAT, opts);
Writeln('semCTL=',sresult); // sresult - ok
Writeln('sem_otime=',semds.sem_otime); // trash value
Writeln('sem_ctime=',semds.sem_ctime); // trash value
Writeln('sem_nsems=',semds.sem_nsems); // trash value
end.
Mantis conversion info:
- Mantis ID: 13363
- OS: Linux
- Platform: x86
- Version: 2.2.2
- Fixed in version: 2.4.4
- Fixed in revision: 16566 (#78a48704)
- Monitored by: » Seweryn Walentynowicz (Seweryn Walentynowicz), » crossbuilder (Burkhard Carstens)