0

In one of my C++ code, I'm trying to open a file in write mode with gdbm_open function. I tried the following modes: GDBM_WRITER, GDBM_NEWDB and GDBM_WRCREAT.

The code hangs exactly at the point of calling the gdbm_open function and doesn't proceed further.

It neither fails nor succeeds, but hangs.

The linux system in which the code is run is EL 5.

Any help/guidance from previous similar experience, in this regards would be appreciated.

Thanks in advance. Murali

  • Could be anything. Show the code. – Sam Varshavchik Oct 30 '14 at 10:59
  • Hi thank you for responding... the function that we call is as follows: gdbm_open("nodes", 512, GDBM_WRCREAT, S_IRUSR|S_IRGRP|S_IROTH|S_IWUSR, NULL); I tried even GDBM_WRITER and GDBM_NEWDB too. Even these doesn't work... – Murali Mahadevan Oct 30 '14 at 11:11
  • Want to add one more info. The directory in which we're trying to create "nodes" file has write permission... Hence, no issue in creating of "nodes"file. – Murali Mahadevan Oct 30 '14 at 11:19
  • Again: what is your evidence that the code "stops" or "hangs". The gdbm_open() call might very well succeed, but then you have a bug that puts your program into an infinite loop. Without seeing ENTIRE, but MINIMAL code that reproduces the problem, it's not possible to determine what goes wrong. – Sam Varshavchik Oct 30 '14 at 23:42

0 Answers0