23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
**
** The "fossil shell" command is intended for use with SEE-enabled fossil.
** It allows multiple commands to be issued without having to reenter the
** crypto phasephrase for each command.
*/
#include "config.h"
#include "fshell.h"
/*
** COMMAND: shell*
**
** Usage: %fossil shell
**
|
>
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
**
** The "fossil shell" command is intended for use with SEE-enabled fossil.
** It allows multiple commands to be issued without having to reenter the
** crypto phasephrase for each command.
*/
#include "config.h"
#include "fshell.h"
#include <ctype.h>
/*
** COMMAND: shell*
**
** Usage: %fossil shell
**
|
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
if( childPid<0 ){
printf("could not fork a child process to handle the command\n");
fflush(stdout);
continue;
}
if( childPid==0 ){
/* This is the child process */
main(nArg, azArg);
exit(0);
}else{
/* The parent process */
int status;
waitpid(childPid, &status, 0);
}
}
#endif
}
|
>
|
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
if( childPid<0 ){
printf("could not fork a child process to handle the command\n");
fflush(stdout);
continue;
}
if( childPid==0 ){
/* This is the child process */
int main(int, char**);
main(nArg, azArg);
exit(0);
}else{
/* The parent process */
int status;
waitpid(childPid, &status, 0);
}
}
#endif
}
|