closes #3437. Also rmprocs can now accept an array of pids too.

Closing #3437. The culprit causing the segfault was a ```stop_reading``` of a socket. During ```gc()``` it resulted in a seg fault. Will file a separate issue for that.