Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2013-01

Catch a signal

6 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Schnell

Hi Linux fans,

I'd like to catch a signal sent to a Linux program.

Here: http://www.freepascal.org/docs-html/rtl/oldlinux/signal.html I see: "Install signal handler (deprecated) ... This call has the same functionality as the *SigAction* call. "

So I tried to do this:
http://www.freepascal.org/docs-html/rtl/oldlinux/sigaction.html

It does not compile, as the unit oldlinux is not compiled in the "normal" Lazarus svn installation.

So I tried to add the directory of oldlinux.pp to the project options (no problem).

This now asks for adding multiple more directories with inc files (no problem either)

But finally the project gets linker errors, as "lineinfo" is not provided.

Trying to add this seemingly results in recompiling the complete rtl, which I of course don't want to do.

So: Hot to catch a signal ?

-Michael

Reply by email

Sven Barth
to Michael Schnell: I'd like to catch a signal sent to a Linux program. Here:…
Michael Schnell wrote 27 lines
Hi Linux fans, I'd like to catch a signal sent to a Linux program. Here: http://www.freepascal.org/docs-html/rtl/oldlinux/signal.html I see: "Install signal handler (deprecated) ... This call has the same functionality as the *SigAction* call. " So I tried to do this: http://www.freepascal.org/docs-html/rtl/oldlinux/sigaction.html It does not compile, as the unit oldlinux is not compiled in the "normal" Lazarus svn installation. So I tried to add the directory of oldlinux.pp to the project options (no problem). This now asks for adding multiple more directories with inc files (no problem either) But finally the project gets linker errors, as "lineinfo" is not provided. Trying to add this seemingly results in recompiling the complete rtl, which I of course don't want to do. So: Hot to catch a signal ?

What does the name "old" imply to you?

Nevertheless: The functionality of SigAction is provided by FpSigAction in the unit BaseUnix. For documentation and an example look here: http://www.freepascal.org/docs-html/rtl/baseunix/fpsigaction.html

Regards,
Sven

Reply by email

Marco van de Voort
to Michael Schnell: I'd like to catch a signal sent to a Linux program. Here:…

In our previous episode, Michael Schnell said:

Show quoted text 10 lines
Here: http://www.freepascal.org/docs-html/rtl/oldlinux/signal.html I see: "Install signal handler (deprecated) ... This call has the same functionality as the *SigAction* call. " So I tried to do this: http://www.freepascal.org/docs-html/rtl/oldlinux/sigaction.html It does not compile, as the unit oldlinux is not compiled in the "normal" Lazarus svn installation.

Or any "normal" installation since it has been deprecated since 2004.

See baseunix.fpsigaction or baseunix.fpsignal.

People stubbornly trying to use it anyway is exactly the reason why it isn't compiled by default anymore. And in 2.6.2 unit libc will trigger a "deprecated" warning for exactly the same reason.

Reply by email

Michael Schnell
to Marco van de Voort
Marco van de Voort wrote
People stubbornly trying to use it anyway is exactly the reason why it isn't compiled by default anymore.

Obviously and as it should be !

It was just a documentation problem and silly me not taking "old" for "depreciated".

Thanks again,
-Michael

Reply by email