|
@@ -20,6 +20,7 @@ void EShInit(int argc, char** argv) {
|
|
|
"Commands history file path: %s\n"
|
|
|
"Max history lines: %d\n"
|
|
|
"Max running jobs: %d\n"
|
|
|
+ "Max single command length: %d\n"
|
|
|
"===================================\n",
|
|
|
esh_info_global->user_data->pw_name,
|
|
|
esh_info_global->build_ref,
|
|
@@ -28,7 +29,8 @@ void EShInit(int argc, char** argv) {
|
|
|
esh_info_global->config_file_path,
|
|
|
esh_info_global->history_file_path,
|
|
|
esh_info_global->history_limit,
|
|
|
- esh_info_global->max_jobs_number);
|
|
|
+ esh_info_global->max_jobs_number,
|
|
|
+ esh_info_global->max_command_length);
|
|
|
}
|
|
|
|
|
|
void EShInitInfo(int argc, char** argv) {
|
|
@@ -59,6 +61,8 @@ void EShInitInfo(int argc, char** argv) {
|
|
|
|
|
|
esh_info_global->max_jobs_number = 64;
|
|
|
|
|
|
+ esh_info_global->max_command_length = 1024;
|
|
|
+
|
|
|
esh_info_global->jobs_number = 0;
|
|
|
|
|
|
esh_info_global->max_invite_message_len = 2048;
|
|
@@ -95,6 +99,10 @@ void EShParseCommandLineArgs(int argc, char** argv) {
|
|
|
if (strcmp(argv[i], "-max_active_jobs") == 0) {
|
|
|
sscanf(argv[i + 1], "%d", &esh_info_global->max_jobs_number);
|
|
|
}
|
|
|
+
|
|
|
+ if (strcmp(argv[i], "-max_command_length") == 0) {
|
|
|
+ sscanf(argv[i + 1], "%d", &esh_info_global->max_command_length);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -124,6 +132,10 @@ void EShProcessConfigFile() {
|
|
|
if (strstr(line, "max_active_jobs=") == line) {
|
|
|
sscanf(line + strlen("max_active_jobs="), "%d", &esh_info_global->max_jobs_number);
|
|
|
}
|
|
|
+
|
|
|
+ if (strstr(line, "max_command_length=") == line) {
|
|
|
+ sscanf(line + strlen("max_command_length="), "%d", &esh_info_global->max_command_length);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
fclose(file);
|