Do not assume fixed line lengths for /proc/acpi/wakeup file
The lines in that file might be equal or longer than 40 characters, which
means that the getline() call will truncate them, possibly at the wrong
place, and then be unable to proceed, as subsequent calls will get stuck
waiting for input that is not coming.