Add standard input test for GNL

if fd <= 0 when checking errors instead of fd < 0