Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!uwvax!umn-d-ub!umn-cs!nis!pwcs!stag!syntel!dal From: dal@syntel.mn.org (Dale Schumacher) Newsgroups: comp.os.minix Subject: First open and last close for devices Summary: Will MINIX support first open and last close operations Message-ID: <090889A6304@syntel.mn.org> Date: 9 Oct 89 04:59:42 GMT Reply-To: dal@syntel.mn.org (Dale Schumacher) Lines: 19 X-Member-Of: STdNET (ST Developer's Network) In researching the Minix device driver code, specifically the tty driver(s), a serious problem of missing functionality has come up. It seems that Minix has no concept of "first open" and "last close" for a device. How is a device supposed to know when to perform initialization and reset functions, like raising and lowering DTR to an external modem, without this kind of support. Simply counting the open()s and close()s will not work, since a device (and ttys specifically) can be and are often close()d more times than they are open()ed. As pointed out by an earlier message about the exit() function, many programs end by closing, instead of just flushing, the 3 standard streams, but there are no corresponding opens, since the streams were inherited from the parent (usually the shell). So, has anyone considered how "first open" and "last close" hooks could be added to Minix, or how else to solve this problem? \\ / Dale Schumacher 399 Beacon Ave. \\ / (alias: Dalnefre') St. Paul, MN 55104-3527 >< ...umn-cs!midgard.mn.org!syntel!dal United States of America / \\ "What is wanted is not the will to believe, but the will to find out, / \\ which is the exact opposite." -Bertrand Russell