tags:

views:

33

answers:

2

hello, i am creating an application in c++ gtk and if i press an button an threading process will start and i need to run the application if the window is closed also is it is possible?

A: 

On Windows, you need to create a Windows/Linux/Mac Service or run the process in background. On Linux you need to create a daemon service or run the process in background. Services allow to automatically start the process on boot.

Amit Kumar
i need it in linux not windows
rrama
A: 
#include <stdlib.h>

int main()
{
    system("echo HelloWorld &");

    return 0;
}

This will spawn a new process.

Note: In general for the purpose of portability, avoid system functions.

penguinpower