next up previous contents index
Next: Qt Designer Up: Starting in Background Previous: Windows   Contents   Index


Super server

If you use inetd or xinetd your server is connected to the network by STDIN and STDOUT. Now you can create a small server which gives the users some choices. For example you could use a QTabBar and insert a QIconView in each tab. When the user clicks an icon you will call a new server. In this case only 1 super server has to be defined for inetd or xinetd. The super server will call all other servers. When the child terminates you will be back in the super server.

Figure 4.12: Starting childs from a super server
case BUTTON_EVENT:
  if(i == pushButton1)
  {
    system("/srv/pvs/pvchild1/pvchild1 -cd=/srv/pvs/pvchild1");
    return 1;
  }
  if(i == pushButton2)
  {
    system("/srv/pvs/pvchild2/pvchild2 -cd=/srv/pvs/pvchild2");
    return 1;
  }
  ...
  break;

Figure 4.13: Return from child to super server
case BUTTON_EVENT:
  if(i == pushButtonBack) exit(0);
  ...
  break;



Rainer Lehrig 2004-02-17