vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Am porting some code to aix and can't open /dev/urandom from a 64 bit build. int fd = open("/dev/urandom", O_RDONLY); fails with EAGAIN. Same test code built 32 bit works fine. Am using gcc 3.4.4 to build the code. Can find no info on the net about this. Anyone? Thanks Mark |
| |||
| Mark Woollard wrote: > Am porting some code to aix and can't open /dev/urandom from a 64 bit > build. > > int fd = open("/dev/urandom", O_RDONLY); > > fails with EAGAIN. Same test code built 32 bit works fine. Am using gcc > 3.4.4 to build the code. Can find no info on the net about this. > > Anyone? > > Thanks > Mark > Hi Mark, EAGAIN The O_TRUNC flag is set and the named file contains a record lock owned by another process. http://publib16.boulder.ibm.com/doc_...etrf1/open.htm may give you some good information. You may want to look at open64, but I don't think that will solve your problem. Hope this is somewhat useful. ---Phil |
| ||||
| I've spotted that in the open man page. But I'm passing O_RDONLY which is defined as 0 and am not setting O_TRUNC. Have tried open64 variant too with no change. Also, forgot to mention but this is on 5.2. Thanks for the input anyway:-) Mark |