# HG changeset patch # User atton # Date 1448353915 -32400 # Node ID c908e2c7315d75ef5a7cdf4e93a89fbd99e3f650 # Parent fe7095c365cfeb852d8a935ec0a3928da1932ec3 WIP: run command diff -r fe7095c365cf -r c908e2c7315d ie-docker.c --- a/ie-docker.c Tue Nov 24 17:22:12 2015 +0900 +++ b/ie-docker.c Tue Nov 24 17:31:55 2015 +0900 @@ -279,18 +279,19 @@ exit(0); } - PSLISTPTR pslist = get_pslist(pattern); - /* * Check argv for proper arguments and run * the corresponding script, if invoked. */ + char *execl_command = malloc(sizeof(char) * 1024); if (command_is_matched(argv[1], ps_command)) { - printf("ps"); //TODO - print_pslist(pslist); + PSLISTPTR pslist = get_pslist(pattern); + print_pslist(pslist); // TODO check work correctly } else if (command_is_matched(argv[1], run_command)) { - printf("run"); // TODO + sprintf(execl_command, "%s %s %s --name %s %s %s", + base_exec_command, run_command, "-it -u 2015 ", name, "java-centos", "zsh"); //FIXME + printf(execl_command); // TODO } else if (command_is_matched(argv[1], start_command)) { printf("start"); // TODO } else if (command_is_matched(argv[1], stop_command)) { @@ -305,6 +306,7 @@ usage(); return 0; } + free(execl_command); return 0; }