Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msunews!uwm.edu!vixen.cso.uiuc.edu!howland.reston.ans.net!Germany.EU.net!zib-berlin.de!irz401!uriah.heep!not-for-mail From: j@uriah.heep.sax.de (J Wunsch) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Printing filter question Date: 21 Oct 1995 11:36:28 +0100 Organization: Private FreeBSD site, Dresden. Lines: 54 Message-ID: <46aifc$g8g@uriah.heep.sax.de> References: <45qn2o$irh@uriah.heep.sax.de> <460igq$dag@atlantis.utmb.edu> <463fud$n55@news.rrz.uni-koeln.de> NNTP-Posting-Host: uriah.heep.sax.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Stefan Esser <se@MI.Uni-Koeln.DE> wrote: >|> Don't know about FreeBSD, but on Sun OS 4.1.x, using "lp=/dev/null" like this fails on some kind of permission problem. >Is the problem with /dev/null file locking ? >This was on ULTRIX, but I guess that locking of /dev/null works >just fine on any UNIX (does it ?). j@uriah 88% perl -e 'open(NULL,">/dev/null");flock(NULL,2);$|=1;\ ? for($i=0;$i<1000;$i++){print NULL "foo\n"; print ".";}' & \ ? perl -e 'open(NULL,">/dev/null");flock(NULL,2);$|=1;\ ? for($i=0;$i<1000;$i++){print NULL "foo\n"; print "+";}' [1] 16618 +++++++++++++++++++++....................................................\ .........................................................................\ .........................................................................\ ........+.+.+.+.+.+.+.+.+.+.+.+.+.+........................++++++++++++++\ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\ +++++++++++++++++++++++++++++++++++++++++++++++++++++++..................\ .........................................................................\ .........................................................................\ .........................................................................\ .........................................................................\ ..................................+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.++.+.+.+.\ +.+.+.+.+.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\ ++++++++++++++++++++++++.................................................\ .........................................................................\ .........................................................................\ .........................................................................\ .........................................................................\ ................................................+++++++++++++++++++++++++\ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\ +++++++++++++++++++++++++++++[1] + Done perl -e ... So it doesn't seem you could lock /dev/null under FreeBSD. :) (Long line broken for sanity.) -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)