root@bu-cs.UUCP (Barry Shein) (07/15/85)
Please tell me if I am wrong but if I create a new window and immediately try to query it's size, it will be zero X zero as in: (my actual code has more err checks, that's not the problem!) #include <sys/window.h> struct uwdata uw ; close(0) ; open("/dev/window",2) ; close(1) ; close(2) ; dup(0) ; dup(0) ; /* stdin, stdout and stderr are all in the window */ ioctl(0,WIOCGETD,&uw) ; printf("%d X %d\n",uw_width,uw_height) ; will print 0 X 0 If I add any output such as: write(1,"Hello World\n",12) ; before the ioctl, then all is well, so, question: does anyone know exactly what is going on here, like is there another way to wake things up besides scribbling i/o? Is this a bug or a feature? Thanks in advance. -Barry Shein, Boston University P.S. Not serious, but confusing till ya figure out how to work-around.