aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-09-17 10:56:41 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-09-18 23:08:03 -0400
commit6f7cf6e1094e54e593801cc452b65ae9c7b4824a (patch)
treeb1136808c9dc35283dc92ccfbd3431454512ce76
parent3ef3a2758c572dcdeed7d693f52c5049394f11f5 (diff)
downloadstasis-6f7cf6e1094e54e593801cc452b65ae9c7b4824a.tar.gz
Remove short circuit test code
* Remove exmain() and dead comments from main()
-rw-r--r--src/multiprocessing.c29
-rw-r--r--src/stasis_main.c7
2 files changed, 1 insertions, 35 deletions
diff --git a/src/multiprocessing.c b/src/multiprocessing.c
index 8709911..8e11a93 100644
--- a/src/multiprocessing.c
+++ b/src/multiprocessing.c
@@ -437,31 +437,4 @@ void mp_pool_free(struct MultiProcessingPool **pool) {
}
(*pool) = NULL;
}
-}
-
-int exmain(int argc, char *argv[]) {
- size_t i;
- struct MultiProcessingPool *pool = mp_pool_init("generic", "logs");
- if (!pool) {
- perror("pool init");
- exit(1);
- }
-
- char *commands[] = {
- "sleep 2; dd if=/dev/zero of=file.dat bs=1M count=1",
- "/bin/echo hello world; sleep 5",
- "python -c 'print(1+1)'",
- "(for x in {1..10}; do echo $x; sleep 0.5; done)",
- "echo stdout >&1; echo stderr >&2; exit 1"
- };
-
- for (i = 0; i < sizeof(commands) / sizeof(*commands); i++) {
- if (mp_task(pool, "commands array", commands[i]) == NULL) {
- printf("Too many tasks queued (max: %d)\n", MP_POOL_TASK_MAX);
- break;
- }
- }
- mp_pool_join(pool, get_cpu_count() - 1, MP_POOL_FAIL_FAST);
- mp_pool_free(&pool);
- return 0;
-}
+} \ No newline at end of file
diff --git a/src/stasis_main.c b/src/stasis_main.c
index 164a9ca..72b7cdd 100644
--- a/src/stasis_main.c
+++ b/src/stasis_main.c
@@ -206,13 +206,6 @@ static void check_requirements(struct Delivery *ctx) {
}
int main(int argc, char *argv[]) {
- /*
- extern int exmain(int argc, char *argv[]);
- exmain(argc, argv);
- printf("ending program\n");
- exit(0);
- */
-
struct Delivery ctx;
struct Process proc = {
.f_stdout = "",