Forum > General

[CLOSED] How do I disable the app from closing.

<< < (3/4) > >>

PascalDragon:

--- Quote from: loaded on October 26, 2021, 09:58:23 am ---I wanted to make Server-User style control software for controlling computers used by students in School Libraries. While I was reviewing possible scenarios, I wanted to consult you when the possibility of being turned off by talented students arose.

--- End quote ---

I had already suspected that it will be something like this. The main point will be that the stundent accounts must not be accounts with administrative access. Then you can either use a service as others suggested (in that case if you need to display something to the user you'll need a separate application that runs in the user's context and communicates with your service) or make sure that your application is started by the system and thus runs with higher privileges. Then the students won't be able to kill your application.

MarkMLl:

--- Quote from: PascalDragon on October 27, 2021, 09:13:53 am ---I had already suspected that it will be something like this. The main point will be that the stundent accounts must not be accounts with administrative access.

--- End quote ---

I can't resist throwing this in as a cautionary tale. Years ago, somebody on CIX (a British conferencing system) encountered a restaurant remote-ordering system set up using Windows NT... probably chosen because it was understood to be a good foundation for robust central systems.

It comprised a dial-in remote-access desktop, with full admin rights, on which was running a standard desktop program. Leaving the start button, taskbar facilities and so on completely unprotected.

It no doubt looked very pretty, but I can't help but feel that somebody had missed the point.

MarkMLl

jollytall:
Under Linux and C++ I can hijack the signals Interrupt and Terminate. Once they are hijacked, I can do anything with it, even ignore.
I know Signals are Unix-like specific animals and that FPC/Lazarus is cross platform and thus looking at these things more in an abstract way, but my question would be, whether and how I can use the same C++ trick under Pascal in Linux?

MarkMLl:
Use the same code. See BaseUnix.

Note however that you can't block the kill signal.

MarkMLl

jollytall:
Thanks,
I indeed could make it for SIGINT and SIGTERM, but not for SIGKILL.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version