removed unused variable
changed halt function to remove process from linked list, and call exit function if no more exist in linked list