From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,e06aa9ce6bda2493,start X-Google-Attributes: gidfee84,public From: Bob Vickers Subject: Using ndbm on OSF Unix 3.2 Date: 1996/10/28 Message-ID: <3274E6C1.41C6@dcs.rhbnc.ac.uk>#1/1 X-Deja-AN: 192802532 content-type: text/plain; charset=us-ascii organization: Royal Holloway College, University of London mime-version: 1.0 newsgroups: comp.unix.osf.osf1 x-mailer: Mozilla 3.0 (X11; I; OSF1 V3.2 alpha) Hello everyone, I've been trying to use the ndbm routines but without success. This little program fails with the strange error "not owner" (though it works with the GNU emulation of ndbm). Am I doing something daft? The program was compiled with cc -o test7 -g2 -O0 -std1 test7.c and is as follows: #include #include #include #include #include #include #define DB_name "dummy" main() { DBM* db; datum key,content; int i; int stat; char string[10]="123456789"; db = dbm_open (DB_name, O_CREAT, S_IRWXU); if ( db == NULL) { perror("dbm_open failed"); exit(1); } for (i=1;i<500000;i++) { if (i%500==0) printf("%d\n",i); key.dsize=sizeof(i); key.dptr=(char *) (&i); content.dsize=sizeof(string); content.dptr=string; stat=dbm_store (db, key, content, DBM_INSERT); if ( stat != 0) { perror("dbm_store failed"); exit(1); } } dbm_close (db); } Any suggestions gratefully received, Bob -- ============================================================================== Bob Vickers R.Vickers@dcs.rhbnc.ac.uk Department of Computer Science, Royal Holloway College, University of London WWW: http://www.dcs.rhbnc.ac.uk/%7Ebobv/ Phone: +44 1784 443691