[fpc-pascal]Can't run my programs in background

Ken J. Wright kenw at cncware.com
Mon Oct 9 18:14:55 CEST 2000

> >I have this problem with running my FreePascal programs in the background.
> >When I start the program it runs just fine, but as soon as I press the
> >enter button or logout, my program stops and I have to kill (9) to get rid
> >of the stopped program...  Anybody know about this?
> >
> >I get following messages:
> >
> >$ dialserver &          (default for running in background)
> >[1] 15825
> >$                       (Here I press the enter button)
> >
> >[1]+  Stopped (tty output)    dialserver
> You are runnig a program in background, but this program wants to write to 
> the terminal,
> you must use 'fg' to enable it to continue.
> But in genberal you should redirect the output and error files with
> dialserver 1> log 2> error.log &
>   You might also need to redirect the input.

If it is your intention to always run as a background process, then you might
consider running as a daemon instead. Use daemon.pp from the contributed
units page as an example. 


More information about the fpc-pascal mailing list