C++ (Qt)int main(int argc, char **argv){ QCoreApplication app(argc, argv); ... switch (fork()) { case 0: break; case -1: exit(1); default: exit(0); } return app.exec();}