*BSD News Article 79546


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!news.ececs.uc.edu!news.kei.com!news.mathworks.com!fu-berlin.de!zrz.TU-Berlin.DE!news.dfn.de!news.ruhr-uni-bochum.de!news.rhrz.uni-bonn.de!usenet
From: gorski@cips01.physik.uni-bonn.de
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Named pipe with mknod
Date: 30 Sep 1996 13:07:28 GMT
Organization: RHRZ - University of Bonn (Germany)            
Lines: 25
Distribution: world
Message-ID: <GORSKI.96Sep30150728@axiom.somewhere.de>
NNTP-Posting-Host: rhrz-ts3-p3.rhrz.uni-bonn.de



Compile the program below and run it. On FreeBSD it produces:
mknod: Invalid argument

Why ??
I thought this should run on FreeBSD without using mkfifo.





################################################################################

#include <stdio.h>
#include <unistd.h>
#include <sys/stat.h>

main()
{
  
  if ( (mknod("fifo", S_IFIFO|0666, 0))==-1 )
    perror("mknod");
  
}