Experimental changes

Add test_handler
Set signal handlers
Create a function child()
setpgid to make children belong to process group of id group_id
tcsetpgrp to make children foreground
tcsatpgrp (if job->mode == FOREGROUND) to make ish foreground
Experimental Changes(2)

Add sigchld_action
Set SIGCHLD action
Execute tcsetpgrp in case job->mode == BACKGROUND
Experimental changes(3)

k_getline continues reading even if it is interrupted
Set SIGTTIN handler = SIGIGN
The shell changes the foregroud process group to that of its children
The shell waits for children even if it is interrupted if job->mode == FOREGROUND
Experimental changes(4)

The first child changes foreground process group instead of the shell.
This also works.
Cleanup

Remove unused code
Wrap debug print code with "#if DEBUG" and "#endif"
Stop waiting for children if they receive SIGTSTP
Write job manager (not complete)

Add pgroup IDs when jobs are run
Add bg_run()

TODO Remove pgid from pgroups
Remove pgid from pgroup

bg returns error if no process groups are stopped
add fg_run (imcomplete)

fg_run runs suspended process groups, which is not correct
Created pg_wait()

Shell changes foreground process groups.
Cleanup

Add list operations to int_list.c
Call list functions in job.c
Add global variable bgpg

fg_run works correctly
Cleanup

Remove unnecessary global variables (wait_cont, cur_fg)
Rewrite comments
Cleanup (file scope)
Make global variables and functions static (file-scope)
Add signal.c

Fix memory leak problem in ish.c
Cleanup (Remove debug code)

Remove debug code in ish.c
Fix CMakeLists.txt

Use CMAKE_CURRENT_SOURCE_DIR instead of CMAKE_CURRENT_LIST_DIR (since cmake 2.8.3)