Recent

Author Topic: Program running on after exiting Lazarus  (Read 396 times)

jollytall

  • Sr. Member
  • ****
  • Posts: 373
Program running on after exiting Lazarus
« on: December 09, 2024, 12:31:55 pm »
I have another problem https://forum.lazarus.freepascal.org/index.php/topic,69558.0.html and to test that I wrote a small command line program. If I run it in a terminal then it ends up in an infinite error loop (it is interesting in itself why a loop when the whole program is linear - see there). So, if I kill it with Ctrl-C it stops.
However if I run it from Lazarus (without debugging) the error is not shown in the terminal window (CtrlAlt-O) and it seems that the program ended. I can even normally exit Lazarus.
However the program runs in the background on and as it is an infinite loop of errors it generates lot os entries in the syslog and in the user log. As you do not notice that the program is still running (it has no terminal, nothing) and it does not end when the mother process (Lazarus) exits, it can just eat disk space slowly.
So, after a while I got a disk full error and a system crash.

Is it a bug somewhere or is it normal behavior?

MarkMLl

  • Hero Member
  • *****
  • Posts: 8080
Re: Program running on after exiting Lazarus
« Reply #1 on: December 09, 2024, 03:23:45 pm »
This is not a fix to the underlying problem, but the rlimit API might be able to limit resource consumption usefully.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018