Works for system except it doesn't quit.

Will work for threads because they share global variables?