Skip to content

Fix fork handling and pipe in executor.c#11

Open
ronak-15 wants to merge 1 commit intoRootSprout:masterfrom
ronak-15:fix-fork
Open

Fix fork handling and pipe in executor.c#11
ronak-15 wants to merge 1 commit intoRootSprout:masterfrom
ronak-15:fix-fork

Conversation

@ronak-15
Copy link
Copy Markdown

Changes Made

  • Updated execute_commands in executor.c to handle:
    • Safe fork() error handling
    • Pipe handling between commands

Testing Done

  • Manual tests:
    • ls
    • ls | grep ".c"
    • echo "hello" > test.txt and cat < test.txt
    • echo "append" >> test.txt
  • Verified forks, pipes, and redirection work as expected.
    But after testing I have deleted the files.

Notes

  • This change does not affect built-in commands.
  • No new dependencies added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant