Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QProcess VS Qt-Solutions for daemon-service app
QtWS: Super Early Bird Tickets Available!

QProcess VS Qt-Solutions for daemon-service app

Scheduled Pinned Locked Moved Solved General and Desktop
qprocessdaemonservicelinuxwindows desktop
7 Posts 3 Posters 4.3k Views
  • 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.
  • A Offline
    A Offline
    ainu
    wrote on last edited by
    #1

    Hi, i looked through some resources and examples but it is still unclear for me if i have to use QProcess or Qt-Solutions in case i want to build daemon/service app ( for Linux/Windows respectively ). Could anybody clearify this please?

    Thank you in advance

    kshegunovK 1 Reply Last reply
    0
  • kshegunovK Offline
    kshegunovK Offline
    kshegunov Moderators
    replied to ainu on last edited by
    #2

    I don't see how QProcess would help you to build a daemon, you could use QtService or if you want to try it out QtDaemon (by myself and SGaist). The latter has a branch to be merged but I have been far too busy to do it.

    Read and abide by the Qt Code of Conduct

    A 1 Reply Last reply
    2
  • A Offline
    A Offline
    ainu
    replied to kshegunov on last edited by ainu
    #3

    @kshegunov thank you for yout help)

    1 Reply Last reply
    0
  • jeremy_kJ Offline
    jeremy_kJ Offline
    jeremy_k
    wrote on last edited by
    #4

    QProcess::startDetached allows you to start a program as a detached process that can outlive the parent process. It doesn't do anything to help create that program.

    I'm presuming you're referring to the Qt Solutions service component, which provides facilities for creating and managing the execution of a service.

    Asking a question about code? http://eel.is/iso-c++/testcase/

    A 1 Reply Last reply
    1
  • A Offline
    A Offline
    ainu
    replied to jeremy_k on last edited by
    #5

    @jeremy_k thank you for your answer. This QProcess ability of detaching processes made me believe ( and seems falsely ) that i can create a daemon/service with it. But what did you mean by the phrase "it doesn't do anything to help create that program?"

    and i still have question about this phrase from qt man "Unix: The started process will run in its own session and act like a daemon." Does this phrase mean that the new detached process is a daemon on Unix systems but it can't act as a service on Windows? and so i'd better put my eyes on Qt Solutons service component?

    Thank you for your help

    kshegunovK 1 Reply Last reply
    0
  • kshegunovK Offline
    kshegunovK Offline
    kshegunov Moderators
    replied to ainu on last edited by
    #6

    @ainu said in QProcess VS Qt-Solutions for daemon-service app:

    Does this phrase mean that the new detached process is a daemon on Unix systems but it can't act as a service on Windows?

    Not exactly no. On *nix systems one needs to detach from the terminal when making a daemon (which is what I do in the QtDaemon module) on windows there's a specific API for services that works differently. That's why it's best you choose one of the proposed 2 solutions.

    Read and abide by the Qt Code of Conduct

    A 1 Reply Last reply
    2
  • A Offline
    A Offline
    ainu
    replied to kshegunov on last edited by
    #7

    @kshegunov I see, now i understand. Thank you for your help and for your patience.

    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