- Timestamp:
- Sep 16, 2020, 1:28:47 AM (5 years ago)
- Location:
- trunk/src/kash
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/shfork-win.c
r3460 r3468 158 158 setlocale(LC_ALL, ""); 159 159 init_syntax(); 160 sh_init_globals(); 160 161 } 161 162 return pid; -
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*/); -
trunk/src/kash/shinstance.h
r3467 r3468 444 444 }; 445 445 446 446 extern void sh_init_globals(void); 447 447 extern shinstance *sh_create_root_shell(char **, char **); 448 448 extern shinstance *sh_create_child_shell(shinstance *);
Note:
See TracChangeset
for help on using the changeset viewer.