Changeset 2912 in kBuild for trunk/src/kmk/w32
- Timestamp:
- Sep 14, 2016 1:36:15 PM (9 years ago)
- Location:
- trunk/src/kmk/w32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/w32/include/sub_proc.h
r2844 r2912 50 50 #ifdef KMK 51 51 EXTERN_DECL(int process_kmk_register_submit, (HANDLE hEvent, intptr_t clue, pid_t *pPid)); 52 EXTERN_DECL(int process_kmk_register_redirect, (HANDLE hProcess, pid_t *pPid)); 52 53 #endif 53 54 -
trunk/src/kmk/w32/subproc/sub_proc.c
r2886 r2912 199 199 200 200 #ifdef KMK 201 201 202 /** 202 203 * Interface used by kmkbuiltin/kSubmit.c to register stuff going down in a … … 223 224 return -1; 224 225 } 225 #endif 226 227 /** 228 * Interface used by kmkbuiltin/kRedirect.c to register a spawned process. 229 * 230 * @returns 0 on success, -1 if there are too many sub-processes already. 231 * @param hProcess The process handle. 232 * @param pPid Where to return the pid that job.c expects. 233 */ 234 int 235 process_kmk_register_redirect(HANDLE hProcess, pid_t *pPid) 236 { 237 if (proc_index < MAXIMUM_WAIT_OBJECTS) { 238 sub_process *pSubProc = (sub_process *)xcalloc(sizeof(*pSubProc)); 239 pSubProc->enmType = kRegular; 240 pSubProc->pid = (intptr_t)hProcess; 241 242 proc_array[proc_index++] = pSubProc; 243 *pPid = (intptr_t)pSubProc; 244 return 0; 245 } 246 return -1; 247 } 248 249 #endif /* KMK */ 226 250 227 251 /*
Note:
See TracChangeset
for help on using the changeset viewer.