| | 5714 | } else if (strcmp(session_type, VPROCMGR_SESSION_LOGINWINDOW) == 0) { |
| | 5715 | jobmgr_t jmi; |
| | 5716 | |
| | 5717 | /* |
| | 5718 | * 5330262 |
| | 5719 | * |
| | 5720 | * We're working around LoginWindow and the WindowServer. |
| | 5721 | * |
| | 5722 | * In practice, there is only one LoginWindow session. * Unfortunately, for certain |
| | 5723 | * scenarios, the WindowServer spawns loginwindow, and in those cases, it frequently |
| | 5724 | * spawns a replacement loginwindow session before cleaning up the previous one. |
| | 5725 | * |
| | 5726 | * We're going to use the creation of a new LoginWindow context as a clue that the |
| | 5727 | * previous LoginWindow context is on the way out and therefore we should just |
| | 5728 | * kick-start the shutdown of it. |
| | 5729 | */ |
| | 5730 | |
| | 5731 | SLIST_FOREACH(jmi, &root_jobmgr->submgrs, sle) { |
| | 5732 | if (jmi->shutting_down) { |
| | 5733 | continue; |
| | 5734 | } else if (strcasecmp(jmi->name, session_type) == 0) { |
| | 5735 | jobmgr_shutdown(jmi); |
| | 5736 | break; |
| | 5737 | } |
| | 5738 | } |