[fpc-pascal]Problems with setitimer....

Judison jueca at brturbo.com
Thu Nov 21 02:07:09 CET 2002


Hi all

First excuse my poor english,

I'm trying to use setitimer (man setitimer) to get "alarmed" every X ms under
linux... and since we don't have the setitimer and getitimer in RTL yet
(Marco van de Voort will include it), I tried to use SysCall, but, it seens
that I'm doing something wrong....

I attached the pascal source (test.pas) and a C source that works (ctest.c)
(gcc -o ctest ctest.c)

The C test, recieves a signal (SIGALRM) every 50ms, and the Pascal one, does
not recieve anything... but, if I:

# killall -ALRM test

the Test recieves it, but, the next time I do this, it prints "Alarm clock"
and the program is terminated.

(it all, even with FPC 1.0.6 and 1.1 compiled today from cvs)

TIA
Your friend,
Judison
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctest.c
Type: application/octet-stream
Size: 547 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20021120/b7c10a6d/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.pas
Type: application/octet-stream
Size: 1295 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20021120/b7c10a6d/attachment-0001.obj>


More information about the fpc-pascal mailing list