> > it is hanging because: > > > > 23208 hexdump CALL read(0,0x81ffc000,0x10000) > > > > It is trying to read too much. A whole buffer, into stdio. > > > > So it empties the pool it can have, and then has to wait for more. > > eventually it does get data, and print 1 char. > > Thanks! I was using the much slower "add printf()s" debugging method... > > > I am susprised that hexdump doesn't decide to read less based on the -n > > argument. > > Me too! > > Thanks a lot for your help, that fixes my issue.
Perhaps a posix weenie can look into making hexdump use setvbuf and adjusting the read requirements for fread() when the length (-n argument) is specified as being short of the blocksize.