diff options
| author | Ákos Kőrösi <korakos99@gmail.com> | 2026-05-24 17:25:06 +0200 |
|---|---|---|
| committer | Ákos Kőrösi <korakos99@gmail.com> | 2026-05-24 17:25:06 +0200 |
| commit | e76e3ba417c0851b14082b97c1b168bba166b1b6 (patch) | |
| tree | b9d48bfe747f1f581909604995bc66b2e00a8374 | |
| parent | 36c518cca8660f2bde6116c9305ddd84f8832c44 (diff) | |
clean up
| -rw-r--r-- | src/preproc.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/preproc.c b/src/preproc.c index 7e93b4c..8fd396a 100644 --- a/src/preproc.c +++ b/src/preproc.c @@ -44,20 +44,15 @@ char* get_cmdsub_output(TokenVec sub_region, ShellState* shstate) { pipe(pipe_fds); PipelineTree sub_tree = process_ast(sub_region, shstate); - printf("AST done\n"); // TODO: tree cleanup - // TODO: is this ok? where should we manage the pgid? int pgid = -1; Channel write_cha = {.fd = pipe_fds[1], .parent_proc_closable = false, .child_proc_closable = true}; execute_command_pipeline(*sub_tree.root, STDIN_CHA, write_cha, true, &pgid, shstate); close(pipe_fds[1]); - //execute_pipeline_tree(*sub_tree.root, shstate, STDIN_FILENO, pipe_fds[1]); - printf("Execution done\n"); String output_buf = make_String(256); - char str_buf[256]; ssize_t len; while ((len = read(pipe_fds[0], str_buf, sizeof(str_buf))) > 0) { @@ -182,7 +177,7 @@ Pipeline* process_token_sequence(TokenVec tokens, PipelineVec* pl_pool, ShellSta case OP_REDIR_W_TRUNC: next_tok = *get_from_ExpandedTokenVec(&exp_tokens, ++i); assert(next_tok.kind == TOK_WORD); - rd = (Redirect){.kind = REDIR_WRITE_TRUNC, .as.filename = next_tok.as.word}; + rd = (Redirect){.kind = REDIR_WRITE_TRUNC, .as.filename = next_tok.as.word}; push_to_RedirectVec(&curr_cmd.redirects, rd); break; default: |
