Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!darwin.sura.net!jvnc.net!yale.edu!yale!gumby!destroyer!cs.ubc.ca!unixg.ubc.ca!kakwa.ucs.ualberta.ca!alberta!cpsc.ucalgary.ca!xenlink!newt.cuc.ab.ca!deraadt From: deraadt@newt.cuc.ab.ca (Theo de Raadt) Subject: 386BSD: fstat bug? Message-ID: <DERAADT.92Nov18061416@newt.newt.cuc.ab.ca> Sender: news@newt.cuc.ab.ca Nntp-Posting-Host: newt Organization: little lizard city Date: Wed, 18 Nov 1992 13:14:16 GMT Lines: 41 I think fstat has a bug. [gecko yp 4 ]# ps agux ps agux | grep bind root 710 0.0 0.0 172 0 p1 S+ 6:58AM 0:00.11 grep bind root 689 0.0 0.0 200 0 p0 S+ 6:55AM 0:00.17 ./ypbind [gecko yp 5 ]# fstat -np 689 USER CMD PID FD DEV INUM MODE SZ|DV root ypbind 689 wd 5,1 81729 40700 512 root ypbind 689 0 0,0 3113 20620 5,0 root ypbind 689 1 0,0 3113 20620 5,0 root ypbind 689 2 0,0 3113 20620 5,0 root ypbind 689 3* internet dgram udp fe30b414 root ypbind 689 4* internet stream tcp fe322414 root ypbind 689 5* internet dgram udp fe30b394 [gecko yp 6 ]# l /var/yp/binding/cuc.ab.ca.2 -rw-r--r-- 1 root 16 Nov 18 06:55 /var/yp/binding/cuc.ab.ca.2 [gecko yp 7 ]# ./testlock /var/yp/binding/cuc.ab.ca.2 -1 35 [gecko yp 8 ]# ./testlock /etc/passwd 0 0 I know for a FACT that this process has file descriptor 7 open. (fd 7 is being used to keep a shared-lock on /var/yp/binding/domainname.2 so that user level processes can access YP fast. It's a Sun hack.) See how fd 6 is not open? I think fstat has a bug. Someone else want to deal with this one? I'll go roll in the snow (yes, there's snow outside) if there's no bug! Those of you who are excited by the word "ypbind", just hold onta yer herses fer a little mer time, eh feller? Sooon... Those who would flame me because "YP is such a terrible system", need not bother sending flames. (I'm writing it from scratch, I know how bad it is.) For those who care, I'm trying to make YP perform better than it does on any other machine (except perhaps Solaris.) <tdr. -- This space not left unintentionally unblank. deraadt@newt.cuc.ab.ca