Path: utzoo!utgpu!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!NUSVM.BITNET!GBOPOLY1 From: GBOPOLY1@NUSVM.BITNET (fclim) Newsgroups: comp.sys.apollo Subject: Re: fifo files on Apollo-systems. Message-ID: <8906120441.AA13421@umix.cc.umich.edu> Date: 12 Jun 89 04:38:14 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 62 X-Unparsable-Date: Mon, 12 Jun 89 12:12:42 SST Hi, In article <1176@draken.nada.kth.se> larss%draken%kth%mcvax.uucp@uunet.uu. net (Lars Schylberg) writes >I have a problem how to create fifo files on the Apollo >system. We are currently running BSD4.2 and 9.7.1. > >To get this to work we are supposed to create two devices with the >command: > >mknod -p /dev/fifo.a >mknod -p /dev/fifo.b > >This command is however not availble in 9.7. I looked in the standard FIFOs are System V goodies and not BSD-ism. Mknod(8) is available under SR9.7 -- look for it in /sys5/etc where /sys5 is the root for all SysV stuff. The command is mknod /dev/fifo.a p -- the file (/dev/fifo.a) created will be a FIFO because of the p option. >This command is however not availble in 9.7. I looked in the standard >library and found the mknod(2). I wrote this program: > >main() >{ > int mode; > mode = 0010000; > mknod("/dev/fifo.a",mode); > mknod("/dev/fifo.b",mode); >} > >and after that chmod 7777 fifo.a and fifo.b to be able to open those >from our program. That didn't work however. What have I done wrong. I do not have my man pages with me; so I can't really tell you. In chmod 7777 /dev/fifo.a the most significant 7 is the sticky bit (setuid, etc) and does not make /dev/fifo.a a FIFO. The one in mode = 0010000 may be the password to make /dev/fifo.a a FIFO; you have to check the man pages (chmod(2) or is it stat(2)) on this -- look up the System V version rather than the BSD4.2 version. >I've seen there is a command mknod(8) with the syntax: > >/etc/mknod name [b] / [c] major minor > >I suppose that I want to create a character device with c >but what do I set major and minor to. The system source file See "The Design of the Unix operating system" (Prentice Hall ISBN-0-87692-516-6 ) by Maurice Bach (chapter on I/O) for an explaination of major/minor -- he explained it better than I ever could. Hope this has been of help. fclim --- gbopoly1 % nusvm.bitnet @ cunyvm.cuny.edu computer centre singapore polytechnic dover road singapore 0513.