From: Steve McKay (mckay@hamblin.math.byu.edu)
Date: 03/30/93


From: mckay@hamblin.math.byu.edu (Steve McKay)
Subject: [Q][BUG?] lib routines getdtablesize and close
Date: 30 Mar 1993 09:39:08


I have been trying lately to find out why MGR does not work on my
machine. I think I have found where it hangs. In the code to get the
shell up and running is the following code:

# ifdef SYSV
    tty_slots = 20;
# else
    tty_slots = getdtablesize();
# endif

printf("before close, tty_slots=%d\n",tty_slots);
    for(i=0;i<tty_slots;i++) { printf("i=%d\n",i); close(i)}
printf("after close, tty_slots=%d\n",tty_slots);

(The printf's are my addition, of course :)
The output from this piece of code is as follows:

before close, tty_slots=256
i=0
i=1

It seems to hang on close(1). Is this a bug? If so which library is buggy?
My system contains the latest SLS distribution without X.

Any help appreciated. Please email responses to
mckay@hamblin.math.byu.edu

                                Thanks!
                                S. McKay