ls.cpp takes input and can exit the program as expected.