NULL buffer in read sys call unpredictable
This is a bad thing to do, but why does a NULL buffer in read(fd,buffer,size) result in:
1. Block call with no error
2. CPU intensive, cpu runs at a 100%
I was asking because some code I wrote by accident had a NULL buffer and it went crazy. I thought it would result in a seg fault at least.
This is just a general inquiry, I was hopin someone would know before I dug around in the read sys call.
Thanks
Jonathan S.
|