refactoring search and employ signalfd