Real Software Forums
http://forums.realsoftware.com/

Console application and Daemonize
http://forums.realsoftware.com/viewtopic.php?f=8&t=45572
Page 1 of 1

Author:  ehumail [ Wed Oct 10, 2012 7:07 am ]
Post subject:  Console application and Daemonize

Hi,

I want to create a background application using RS and console app.

The job is read a device status over serial port.
The OS is Debian 6 without GUI, so my solution is:

App.Run
Call Daemonize()

For i As Integer = 0 To 100 //for example
//read serial port
//put the readed string to db
Next
End

The problem that it is not working. After starting app, it quits. (ps -e |grep appname = nothing)
BUT
If I leave the Daemonize() method, the console app is working.

I need to Daemonize, what should I do?

Author:  J.Sh3ppard [ Sat Oct 13, 2012 12:26 pm ]
Post subject:  Re: Console application and Daemonize

ehumail wrote:
Hi,

I want to create a background application using RS and console app.

The job is read a device status over serial port.
The OS is Debian 6 without GUI, so my solution is:

App.Run
Call Daemonize()

For i As Integer = 0 To 100 //for example
//read serial port
//put the readed string to db
Next
End

The problem that it is not working. After starting app, it quits. (ps -e |grep appname = nothing)
BUT
If I leave the Daemonize() method, the console app is working.

I need to Daemonize, what should I do?


What should you do?

Read the documentation and search the forum for the answer.

I believe it is that when running in the IDE the app will quit if Daemonized.

Add your Daemonizing code only when you're ready to build.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/