Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How can I instantiate a daemon application in linux to startup automatically once linux boots

How can I instantiate a daemon application in linux to startup automatically once linux boots

Scheduled Pinned Locked Moved Qt Creator and other tools
1 Posts 1 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sunsina
    wrote on last edited by
    #1

    Hi,
    I want to make my console base Qt (5.2) application running as a daemon in my ubuntu linux(64bit) environment,I have successfully compiled the sample code "httpserver" that comes with QtService

    But I do not know how to use that daemonized application as service in linux.
    I would be happy if one could answer following questions:
    1- How shall I call the executable file properly from terminal? "httpserver -i 8080" or "service httpserver start" or "httpserver start"
    2- Why as soon as I run the executable in the terminal the executable httpserver does not close and logout from terminal after running.

    3- How can I extract the PID number of the daemon httpserver since I want to use it with monit
    while the monit application ,in fact monitors the _/var/run/ folder for daemons processes PIDs.

    4- How can I confirm that by top or htop that my process has not *tty * or user shell as its parent process, (the child has obtained his own SID and detached successfully from its parent )

    5-How and where should I place the httpserver executable with its shared libraries to make the application work in its proper working directory.(How can I change the daemon process working directory)

    Thanks in advance

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved