Changeset 440 for trunk/user/ksh
- Timestamp:
- May 3, 2018, 5:51:22 PM (7 years ago)
- Location:
- trunk/user/ksh
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/user/ksh/Makefile
r439 r440 25 25 26 26 clean: 27 rm -rf build/*.o build/*.elf build/*. o.txt27 rm -rf build/*.o build/*.elf build/*.txt 28 28 29 29 .PHONY: dirs clean -
trunk/user/ksh/ksh.c
r437 r440 380 380 if( pid == 0 ) 381 381 { 382 printf(" error: ilegal pid format\n" );382 printf(" error: kernel process 0 cannot be killed\n" ); 383 383 } 384 384 385 385 if( kill( pid , SIGKILL ) ) 386 386 { 387 printf(" error: unable to kill process %x\n", pid );387 printf(" error: process %x cannot be killed\n", pid ); 388 388 } 389 389 } // end cmd_kill() … … 421 421 { 422 422 printf(" error: ksh process unable to fork\n"); 423 return; 423 424 } 424 425 else if (ret_fork == 0) // it is the CHILD process … … 433 434 { 434 435 printf(" error: new process unable to exec <%s>\n", pathname ); 435 exit(0);436 return; 436 437 } 437 438 } … … 445 446 if( rcv_pid == new_pid ) 446 447 { 447 printf("\n\n exit %s / status = %x\n\n", pathname, (status &0xFF) ); 448 printf("\n\n %s normal termination / status = %x\n\n", 449 pathname , (status &0xFF) ); 450 return; 448 451 } 449 452 else 450 453 { 451 printf("\n\n abnormal termination for %s \n\n", pathname ); 454 printf("\n\n %s abnormal termination / status = %x\n\n", 455 pathname , (status &0xFF) ); 456 return; 452 457 } 453 458 } 454 455 459 } // end cmd_load 456 460 … … 689 693 ptr = 0; 690 694 691 printf( " ~~~ shell ~~~\n\n" );695 printf( "\n\n~~~ shell ~~~\n\n" ); 692 696 693 697 // command buffer initialisation
Note: See TracChangeset
for help on using the changeset viewer.