Changeset 3460 in kBuild for trunk/src/kash/shinstance.h
- Timestamp:
- Sep 15, 2020 12:31:01 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/shinstance.h
r3459 r3460 64 64 #endif 65 65 66 #ifndef SH_FORKED_MODE 67 /** 68 * Subshell status. 69 */ 70 typedef struct shsubshellstatus 71 { 72 unsigned volatile refs; /**< Reference counter. */ 73 int volatile status; /**< The exit code. */ 74 KBOOL volatile done; /**< Set if done (valid exit code). */ 75 void *towaiton; /**< Event semaphore / whatever to wait on. */ 76 # if K_OS == K_OS_WINDOWS 77 uintptr_t volatile hThread; /**< The thread handle (child closes this). */ 78 # endif 79 struct shsubshellstatus *next; /**< Next free one on the free chain. */ 80 } shsubshellstatus; 81 #endif 82 66 83 /** 67 84 * A child process. … … 69 86 typedef struct shchild 70 87 { 71 shpid pid;/**< The pid. */88 shpid pid; /**< The pid. */ 72 89 #if K_OS == K_OS_WINDOWS 73 void *hChild; /**< The process handle. */90 void *hChild; /**< The handle to wait on. */ 74 91 #endif 75 92 #ifndef SH_FORKED_MODE 76 KBOOL fProcess; /**< Set if process, clear if internal thread. */93 shsubshellstatus *subshellstatus; /**< Pointer to the subshell status structure. NULL if child process. */ 77 94 #endif 78 95 } shchild; … … 215 232 void *threadarg; /**< The thread argument. */ 216 233 struct jmploc *exitjmp; /**< Long jump target in sh_thread_wrapper for use by sh__exit. */ 234 shsubshellstatus *subshellstatus; /**< Pointer to the subshell status structure (NULL if root). */ 217 235 #endif 218 236 … … 496 514 497 515 /* wait / process */ 498 int sh_add_child(shinstance *psh, shpid pid, void *hChild, KBOOL fProcess);516 int sh_add_child(shinstance *psh, shpid pid, void *hChild, shsubshellstatus *sts); 499 517 #ifdef _MSC_VER 500 518 # include <process.h>
Note:
See TracChangeset
for help on using the changeset viewer.