On Monday 14 March 2005 15:48, Evgeniy wrote: > #include <stdio.h> > #include <errno.h> > main(){ > int err; > err=read(0,NULL,6); > printf("%d %d\n",err,errno); > }
On my box (2.6.11), that does exactly what it is supposed to do -- "-1 14" 14 == EFAULT == "Bad Address", which is what NULL is... Btw, printf("%d %d %s\n", err, errno, strerror(errno)); gives you a more readable error, that would immediately show you did get the right error. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/