From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,9fa73470ab286259,start X-Google-Attributes: gidfc89c,public X-Google-Thread: fee84,9fa73470ab286259,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-10-30 21:22:07 PST Path: nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!news.sprintlink.net!hookup!ames!waikato!thebes.waikato.ac.nz!hamish From: hamish@thebes.waikato.ac.nz (Hamish Marson) Newsgroups: comp.unix.programmer,comp.unix.osf.osf1 Subject: dbm_open returns errno=9 Date: 31 Oct 1994 04:19:43 GMT Organization: The University of Waikato Message-ID: <391r8v$1oe4@thebes.waikato.ac.nz> Reply-To: hamish@waikato.ac.nz NNTP-Posting-Host: thebes.waikato.ac.nz X-Newsreader: TIN [version 1.2 PL2] Xref: nntp.gmd.de comp.unix.programmer:19596 comp.unix.osf.osf1:6185 I'm attempting to open the passwd dbm files with the following statement under DEC's OSF/1 3.0... #define PASSWD_FILE "/etc/passwd" if((pwd = dbm_open(PASSWD_FILE, O_RDWR, 0))==NULL) { fprintf(stderr,"Error %d from dbm_open(%s)\n",errno,PASSWD_FILE); return PWDS_FILE; } and it returns NULL, with errno ==9. errno.h says the following about errno==9... #define EBADF 9 /* Bad file number */ /etc/passwd along with passwd.dir and passwd.pag are all there, perms are 0644 for all 3.... SO my question of the day is, what the heck does errno=9 mean from dbm_open under OSF/1 version 3.0? And why do I get it? dbm_open man page is pretty skimpy when it comes to return values (Only saying that you should get a 0 from any dbm function declared with an int return type. Thanks a lot DEC). -- ====================================================================== | Hamish Marson | | Systems Programmer | | | Computer Services | INTERNET h.marson@waikato.ac.nz | | University of Waikato | PHONE +64 7 8562889 xt 8181 | | New Zealand | FAX +64 7 8384066 | ===========Disclaimer :- Remember. You heard it here first.===========