Revamped dmget for better signal handling