689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
|
g.argv = zNewArgv;
}
zCmdName = g.argv[1];
}
#ifndef _WIN32
/* Make sure open() will not return file descriptor 2. */
{ int nTry = 0;
while( !is_valid_fd(2) && nTry++ < 2 ){
open("/dev/null", O_WRONLY);
}
}
#endif
rc = name_search(zCmdName, aCommand, count(aCommand), FOSSIL_FIRST_CMD, &idx);
if( rc==1 ){
#ifdef FOSSIL_ENABLE_TH1_HOOKS
if( !g.isHTTP && !g.fNoThHook ){
|
|
>
|
|
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
|
g.argv = zNewArgv;
}
zCmdName = g.argv[1];
}
#ifndef _WIN32
/* Make sure open() will not return file descriptor 2. */
{ int nTry = 0;
while( !is_valid_fd(2) && nTry++ < 2 && open("/dev/null",O_WRONLY)>0 ){}
if( !is_valid_fd(2) ){
fossil_fatal("file descriptor 2 is not open");
}
}
#endif
rc = name_search(zCmdName, aCommand, count(aCommand), FOSSIL_FIRST_CMD, &idx);
if( rc==1 ){
#ifdef FOSSIL_ENABLE_TH1_HOOKS
if( !g.isHTTP && !g.fNoThHook ){
|