Describe timeout and ccusers here.
the design of how timeout will unlock terminal with crashed cc session as follow.
1, for all our client they will start any cc program from ccmenubar.otherwise can not control lisence at all , because only ccmenubar will check the numbers of logined terminal.
2, ccmenubar will login a terminal if no ccprogram was running on that terminal , but it will not set session number on that terminal to be 1 as it used to do. that mean if there was 1 crashed program before ccmenubar start , after ccmenubar finishe , the session will be 1.
3,all control application will send keep alive signal at the start of the application also , every once HEARTBIT_PERIOD, the sending of the keep alive signal , was carried out in the form of writing the heartbit_date and heartbit_time field, shared by all the app's running in one terminal. which mean until all the app have been stoped on the terminal for more than CHK_ALIVE_PERIOD amount of time, the crashed app' on the terminal will get clear if user run ccusers, or ccmenubar on any terminal.
4, if in linux mode and the environmental variable CCTMOUT (used in detecting key in timeout)was set, then HEARTBIT_PERIOD and will be set as CCTMOU. MAX_KEYOUT_PEROID was set to limit CCTMOUT, to allow functionable session clearing in ccmenubar and ccuser .
5, all HEARTBIT_PERIOD , CHK_ALIVE_PERIOD and MAX_KEYOUT_PERIOD were all defined in common.c. HEARTBIT_PERIOD and MAX_KEYOUT_PERIOD must be defined smaller than CHK_ALIVE_PERIOD.
after all these blablabla.... ,actually just mean that when there are no cc programs running on a terminal for CHK_ALIVE_PERIOD amount of time.Next time either ccmenubar or ccusers run on any terminal will set the session number of this terminal to 0 and log it out no wether what their original value were
