Changeset 3468 for trunk/src/kash/shinstance.c
- Timestamp:
- Sep 16, 2020, 1:28:47 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/shinstance.c
r3467 r3468 175 175 176 176 /** 177 * Initialize globals in shinstance.c. 178 * 179 * Called when creating the rootshell and on windows after forking. 180 */ 181 void sh_init_globals(void) 182 { 183 assert(g_sh_mtx.au64[SHMTX_MAGIC_IDX] != SHMTX_MAGIC); 184 shmtx_init(&g_sh_mtx); 185 #ifndef SH_FORKED_MODE 186 shmtx_init(&g_sh_exec_inherit_mtx); 187 shmtx_init(&g_sh_sts_mtx); 188 #endif 189 } 190 191 192 /** 177 193 * Links the shell instance. 178 194 * … … 709 725 shinstance *psh; 710 726 711 assert(g_sh_mtx.au64[SHMTX_MAGIC_IDX] != SHMTX_MAGIC); 712 shmtx_init(&g_sh_mtx); 713 #ifndef SH_FORKED_MODE 714 shmtx_init(&g_sh_exec_inherit_mtx); 715 shmtx_init(&g_sh_sts_mtx); 716 #endif 727 sh_init_globals(); 717 728 718 729 psh = sh_create_shell_common(argv, envp, NULL /*parentfdtab*/);
Note:
See TracChangeset
for help on using the changeset viewer.