[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: WRITER mode of gdbm
From: |
Jason Downs |
Subject: |
Re: WRITER mode of gdbm |
Date: |
Tue, 19 Nov 2002 08:19:42 -0800 |
In message <address@hidden>,
Oleg Goodyckov writes:
>Hi!
>
>I try to use gdbm. But I have some trouble.
>When I have not created db "t.db", for example, and want to open it in
>WRITER mode, I want to get error and db_open have to fail. This is written
>in man and info for gdbm.
>But when I issue command
>
> db = gdbm_open("t.db",0,GDBM_WRITER,0,0);
>
>new databse "t.db" is creating. I have not found mode of opening, when
>gdbm_open fails while opening database is not exists. So, how can I reach
>such effect?
GDBM_WRITER works as per the documentation, and is equivalent to calling
open(2) with the flag O_RDWR. If open(..., O_RDWR, ...) is creating a file
when one doesn't exist, your operating system is very broken.
--
Jason Downs
address@hidden