Forum > Linux

reading ini files


Hi All,
I have this console-program that reads some settings at startup.

Everything works flawlessly on a debian 32 system.

On a debian 64 system, however, sometimes I get this error "unable to open file" when trying to read the settings-file. It is read as an ini-file (TInifile.Create(filename).

In the finalization section of the program the ini-file is written back, preserving current settings. Again all ok on debian 32, and sometimes (not always) "unable to open file" on debian 64.

Al paths are the same, all privileges are the same.

Anyone any ideas?


Easiest is to use strace to see what actually goes wrong.

And don't assume it is an 32/64-bit issue till you actually know that it is that.

Two different installations of Debian can differe in more ways than just architecture

Hi Marco,

Hmm, started via strace, it works flawlessly... strated direct from commandline (as root), it gives the error... repeated this several times. I guess I have to dig a little deeper...


When using strace, everything worked fine. I guess the only difference is that through strace, the program is just a bit slower.

So I tried to slow down the program by putting a sleep(1000) just before the TInifile.create() and now everything works just fine!  I guess something that is needed in the chain of the TInifile  just didn't have time enough to initialize.


[0] Message Index

Go to full version