[PATCH 36/43] run-command: track total number of commands run

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Soon, the db refs backend will use this to restart read transactions
after subcommands which might have modified the refs database.

Signed-off-by: David Turner <dturner@xxxxxxxxxxxxxxxx>
---
 run-command.c | 2 ++
 run-command.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/run-command.c b/run-command.c
index 02aab3f..dc4882e 100644
--- a/run-command.c
+++ b/run-command.c
@@ -332,6 +332,7 @@ fail_pipe:
 		cmd->err = fderr[0];
 	}
 
+	total_commands_run ++;
 	trace_argv_printf(cmd->argv, "trace: run_command:");
 	fflush(NULL);
 
@@ -542,6 +543,7 @@ int finish_command(struct child_process *cmd)
 	return ret;
 }
 
+int total_commands_run = 0;
 int run_command(struct child_process *cmd)
 {
 	int code;
diff --git a/run-command.h b/run-command.h
index 5b4425a..3d5ffa5 100644
--- a/run-command.h
+++ b/run-command.h
@@ -119,4 +119,5 @@ struct async {
 int start_async(struct async *async);
 int finish_async(struct async *async);
 
+extern int total_commands_run;
 #endif
-- 
2.0.4.315.gad8727a-twtrsrc

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]