-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Sigwald wrote:
> Here is the actual code:
> 
> int main(void)
> {
>     sqlite3* db_handle;
> 
>      sqlite3_open(DB_NAME,&db_handle);
>      sqlite3_close(db_handle);
>      my_ping("10.0.0.4");
> 
>       return 0;
> }
> 
> If I call close after ping, it works. However, if besides of opening the DB
> I perform any query, ping doesnt work either.

My best guess is that you are making an error with file descriptors.  It
can be quite easy to accidentally use various values with low numbers
instead of the actual file descriptor numbers, and you'll get away with
it until some other code (eg sqlite) opens and closes files.  (Note that
under some circumstances SQLite can leave file descriptors open even
after close is called.)

I suggest using strace and carefully examining the file descriptors used.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkupxGUACgkQmOOfHg372QTd2ACeNaCEFII4TuVK8ZtTpCvZeFeX
ivYAnjuLh8uKl1z1jVauy9Fxa60Po9RR
=AVyR
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to