back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/shell.h
Commit message (Collapse)AuthorAgeFilesLines
* Revise subshell execution and terminal group handlingshell-VIIscratko2025-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | find_end_subshell_before_cur_pos() now accounts for offset caused by two-character tokens (|| and &&). Added many explanatory comments. Modified or removed some fields of the params structure that affected pipe and subshell behavior (e.g., pgid for multiple processes, file descriptors). Changed logic for setting the current terminal process group. Removed side effect in the conditional operator inside special_token_handling() that made the code harder to read. Removed the functions identify_general_pgid() and identify_general_pipe_pgid(). Replaced them with a single function: set_foreground_group(). make_pipeline() now also checks for subshell_before before executing the pipeline. Major changes to the functions make_pipeline(), make_subshell(), and run_external_program(). Subshell exit code now depends on the success or failure of executed programs when using logical operators (|| and &&).
* Shell-VII releasescratko2024-11-231-3/+18
|
* Shell-VI releaseshell-VIscratko2024-11-231-0/+3
| | | | | | Running processes in a single pgid. Changing foreground group to the group of running processes (if readline doesn't end with &).
* Shell-V releaseshell-Vscratko2024-06-231-0/+61
Added pipeline. Formatting shell.c (created lexical_analysys.c). Error codes. Some functions of queue.c are created by preprocessor.