1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

In mptester: improve the way that child processes are dispatched. Pass

the --vfs option through to children.  Log the command used to start
child processes when the tracing level is high enough.

FossilOrigin-Name: 55718ae3462b2b6e0774d49e1c4c74143bc9e3a5
This commit is contained in:
drh
2013-04-12 01:04:36 +00:00
parent fdd72c9a2f
commit 739ee7ffac
3 changed files with 21 additions and 17 deletions

View File

@ -48,10 +48,8 @@
/* The suffix to append to the child command lines, if any */
#if defined(_WIN32)
# define CMDLINE_SUFFIX ""
# define GETPID (int)GetCurrentProcessId
#else
# define CMDLINE_SUFFIX "&"
# define GETPID getpid
#endif
@ -629,14 +627,20 @@ static void startClient(int iClient){
if( sqlite3_changes(g.db) ){
char *zSys;
int rc;
zSys = sqlite3_mprintf(
"%s \"%s\" --client %d --trace %d %s%s%s",
g.argv0, g.zDbFile, iClient, g.iTrace,
g.bSqlTrace ? "--sqltrace " : "",
g.bSync ? "--sync " : "",
CMDLINE_SUFFIX
);
zSys = sqlite3_mprintf("%s \"%s\" --client %d --trace %d",
g.argv0, g.zDbFile, iClient, g.iTrace);
if( g.bSqlTrace ){
zSys = sqlite3_mprintf("%z --sqltrace", zSys);
}
if( g.bSync ){
zSys = sqlite3_mprintf("%z --sync", zSys);
}
if( g.zVfs ){
zSys = sqlite3_mprintf("%z --vfs \"%s\"", zSys, g.zVfs);
}
if( g.iTrace>=2 ) logMessage("system('%q')", zSys);
#if !defined(_WIN32)
zSys = sqlite3_mprintf("%z &", zSys);
rc = system(zSys);
if( rc ) errorMessage("system() fails with error code %d", rc);
#else