Changeset 408 for trunk/user/ksh
- Timestamp:
- Dec 5, 2017, 4:20:07 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user/ksh/ksh.c
r407 r408 268 268 static void cmd_load( int argc , char **argv ) 269 269 { 270 unsigned int pid;271 unsigned int error;272 char * pathname;270 unsigned int pid; 271 unsigned int error; 272 char * pathname; 273 273 274 274 if (argc != 2) … … 285 285 if (pid == 0) // it is the child process 286 286 { 287 288 printf("\n[KSH_DBG] process %x before exec\n", getpid());287 printf("CHILD\n"); 288 exit(0); 289 289 290 290 // exec system call 291 error = exec( pathname , NULL , NULL ); 292 293 printf("\n[KSH_DBG] process %x after exec / error = %d\n", getpid() , error ); 294 295 if( error ) 296 { 297 printf("error: new process unable to exec <%s>\n", pathname ); 298 // TODO exit(); 299 } 291 // error = exec( pathname , NULL , NULL ); 292 293 // if( error ) 294 // { 295 // printf("error: new process unable to exec <%s>\n", pathname ); 296 // exit(); 297 // } 300 298 } 301 299 else if ( pid < 0 ) // it is a failure reported to parent … … 305 303 else // it is a success reported to parent 306 304 { 307 308 printf("\n[KSH_DBG] process %x created for <%s>\n", pid, pathname ); 309 305 printf("PARENT\n"); 306 exit(0); 310 307 } 311 308 … … 590 587 parse("load /bin/user/sort.elf"); 591 588 // @@@ 589 590 592 591 593 592 while (1)
Note: See TracChangeset
for help on using the changeset viewer.