Xref: utzoo comp.unix.questions:14631 comp.unix.wizards:17106 Path: utzoo!attcan!uunet!twwells!bill From: bill@twwells.com (T. William Wells) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: Named Pipe Creation Keywords: pipe Message-ID: <1989Jul2.033624.28953@twwells.com> Date: 2 Jul 89 03:36:24 GMT References: <163@cerc.wvu.wvnet.edu.edu> Organization: None, Ft. Lauderdale, FL Lines: 30 In article <163@cerc.wvu.wvnet.edu.edu> drs@cerc.wvu.wvnet.edu (Darrell Schiebel) writes: : I am attempting to create a named pipe which several different users : can read from and write to, but when I create the pipe with: : : if (mknod(destination_path,S_IFIFO | 0666, 0) == -1) : if (errno != EEXIST) : return(-1); : else errno = 0; : : sock = open(destination_path,O_RDWR); : : the system creates a pipe with owner r/w, group r, and world r. The : protection I was expecting is owner r/w , group r/w, wnd world r/w. Surround your code with something like: savemask = umask(0); ... (void)umask(savemask); after, RTFM'ing. BTW, it looks like you are trying to be clever with errno. Don't. The only thing you are guaranteed by the documentation is that it is set properly after a system call returns an error. For all you know, errno could be set to a random value on success. --- Bill { uunet | novavax | ankh | sunvice } !twwells!bill bill@twwells.com