Hi Kervin
> 1. Try these extra gcc flags in your build...
> "-Wall -Wconversion -Wshadow". Also try
> renaming your database handle to something
>more unique.
I renamed my database handle to something more unique but this did not have
any affect. I also tried the extra flags you mentione
or maybe include )
I hope that helps.
Best regards,
Kervin
- Original Message
> From: Chris Brown <[EMAIL PROTECTED]>
> To: General Discussion of SQLite Database
> Sent: Monday, August 18, 2008 7:06:15 AM
> Subject: Re: [sqlite] System function with Sqlite
>
>
I have tried to trace the problem further through the Sqlite source by
checking at which point I could no-longer successfully call the system
function. I got as far as xOpen through sqlite3_open > opendatabase >
sqlite3Btreefactory > sqlite3Btreeopen > sqlite3PagerOpen > Sqlite3OsOpen >
xOpen.
Hi Chris
> Can you check which libc you are using and if there is any LD_PRELOAD
> or similar active?
There does not appear to be any LD_PRELOAD active. The version of lic is
2.2.3.
Thanks Chris
___
sqlite-users mailing list
sqlite-users@sqlite.org
Hi Asif
> AFAIK, how the system() passes the command-string to the command-processor
> is implementation defined. I would suggest that you also pass the shell
> (e.g. /bin/sh) to system() in addition to the command string. Which shell
> are you using?
I am running bash version 2.05a.0(1). I tried
Hi Chris,
On 8/15/08, Chris Brown <[EMAIL PROTECTED]> wrote:
>
> Can you offer any further help/suggestions?
>
AFAIK, how the system() passes the command-string to the command-processor
is implementation defined. I would suggest that you also pass the shell
(e.g. /bin/sh) to system() in addition
Thanks for your continued help Chris
> As someone else suggest strace might be useful, build your application
> as a binary and run it under strace:
>
> strace -f -o trace.txt ./name/of/your/thang
I do not seem to have strace on my system. I am running Linux version
2.4.17_mv_121-malta-mips_fp
On Thu, Aug 14, 2008 at 04:37:48PM +1200, Chris Brown wrote:
> After SQLite:
[... odd output ...]
> pipe:[120]fd1 ?g?T 1?? 2 04:54:50 CST 2008
> 6
> pipe:[120]fd1 ?g?T 1?? 2 04:54:50 CST 2008
[BTW; Your email is encoded in a very odd way and looks quite
strange to me (others might have mor
On Thu, Aug 14, 2008 at 10:59:57AM +1200, Chris Brown wrote:
> Then this after sqlite3_close but before the second call to system:
>
> .
> ..
> 0
> 1
> 2
> 3
> 5
> 6
that seems wrong, for those which are symlinks (ie. 0->6) can you also
readlink and print that out too please?
it seems like some
> that seems wrong, for those which are symlinks (ie. 0->6) can you also
> readlink and print that out too please?
>
> it seems like some fd's are beinh held open
>
> as a work around you can loop over these fd's (say 2 though 255) and
> set FD_CLOEXEC (lots of things do this, it's a but of a hack
Again, for what it's worth: I'm using gcc 4.1.3 and I've successfully
run this as myself, using sudo, and as root.
While I realize we're not talking Windoze, have you tried rebooting,
recompling, and rerunning it?
> Hi Peter- Yes I'm running the code as you've put above and I used the full
>
What does strace reveal?
--
-- Stevie-O
Real programmers use COPY CON PROGRAM.EXE
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> #include "sqlite3.h"
>
> main(int argc, char **argv)
> {
> static sqlite3 *db;
>
> system("whoami");
> sqlite3_open("junk.dbs", &db);
> sqlite3_close(db);
> system("whoami");
> }
>
> Works fine on mine, Chris. FWIW I did use the full source tree (the
> .tar.gz file) for compi
> before the system calls can you make a fucntion that does a
> open/readdir of /proc/self/fd/ and prints the results (to compare
> before and after)?
Hi Chris- I did as you suggested and I had the following returned before
sqlite3_openis called:
.
..
0
1
2
3
Then this after sqlite3_close but b
#include "sqlite3.h"
main(int argc, char **argv)
{
static sqlite3 *db;
system("whoami");
sqlite3_open("junk.dbs", &db);
sqlite3_close(db);
system("whoami");
}
Works fine on mine, Chris. FWIW I did use the full source tree (the
.tar.gz file) for compilation and install
On Wed, Aug 13, 2008 at 05:08:26PM +1200, Chris Brown wrote:
> At the moment I can replicate this issue simply by having the code
> sample in my previous post inside my main function with the sqlite
> database variable declaration and thats it.
before the system calls can you make a fucntion that
> Are you closing standard output or standard input?
No i'm not closing either.
At the moment I can replicate this issue simply by having the code sample in
my previous post inside my main function with the sqlite database variable
declaration and thats it. If I assign the result of the second
Chris Brown wrote:
>>The "fossil" configuration management system (used to control the
>>documentation of SQLite - see http://www.fossil-scm.org/ for details
>>and http://www.sqlite.org/docsrc/timeline for an example) calls
>>system() after sqlite3_open() in multiple places and it works just
>>fine
> The "fossil" configuration management system (used to control the
> documentation of SQLite - see http://www.fossil-scm.org/ for details
> and http://www.sqlite.org/docsrc/timeline for an example) calls
> system() after sqlite3_open() in multiple places and it works just
> fine on Linux, OSX, var
On Aug 12, 2008, at 10:09 PM, Chris Brown wrote:
> Hi all
>
> I have an application written in C using Sqlite 3.5.9 on MontaVista
> Linux.
>
> I am required to call the 'system()' function from within my code to
> run external programs. Under normal circumstances this works without
> proble
int main(int argc, char **argv)
{
int i;
system("rm ppi.dbs ; sqlite3 ppi.dbs \".read ppi_create.sql\"");
wait(NULL);
/* open the database */
db_connect(); /* which calls sqlite3_open() */
system("echo what?");
wait(NULL);
.
.
.
}
Works for me
Hi all
I have an application written in C using Sqlite 3.5.9 on MontaVista Linux.
I am required to call the 'system()' function from within my code to run
external programs. Under normal circumstances this works without problems.
However as soon as I have used Sqlite from within my code I am u
22 matches
Mail list logo