Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor] 파싱 과정에서 발생하는 에러에 대한 종료 상태 코드 설정 #83

Closed
mingxoxo opened this issue Jan 16, 2023 · 0 comments · Fixed by #85
Closed
Assignees
Labels
🛠 Refactor 코드 리팩토링

Comments

@mingxoxo
Copy link
Owner

🚅 Issue 한 줄 요약

파싱 과정에서 발생하는 에러에 대한 종료코드 설정

🤷 Issue 세부 내용

파싱 과정에서 발생하는 error에 대한 종료 코드를 1로 설정한다.

종료 상태로 사용할 수 있는 값의 범위는 0 부터 255 까지이다.
하지만 bash에서의 syntax error 종료코드는 아래와 같다.
0~255를 벗어난 custom한 종료 상태 코드로 보여져 고려하지 않기로 결정했다.

#define EX_BADSYNTAX	257	/* shell syntax error */
#define EX_USAGE	258	/* syntax error in usage */
#define EX_REDIRFAIL	259	/* redirection failed */
#define EX_BADASSIGN	260	/* variable assignment error */
#define EX_EXPFAIL	261	/* word expansion failed */
#define EX_DISKFALLBACK	262	/* fall back to disk command from builtin */

[참고] : 링크1 , 링크2

📸 스크린샷

스크린샷 2023-01-16 오후 11 01 17

@mingxoxo mingxoxo added the 🛠 Refactor 코드 리팩토링 label Jan 16, 2023
@mingxoxo mingxoxo self-assigned this Jan 16, 2023
@mingxoxo mingxoxo moved this to 📋 To-do in Minishell backlog Jan 16, 2023
@mingxoxo mingxoxo linked a pull request Jan 16, 2023 that will close this issue
@wonyangs wonyangs moved this from 📋 To-do to 🏗 In progress in Minishell backlog Jan 17, 2023
wonyangs added a commit that referenced this issue Jan 17, 2023
…종료-상태-코드-설정

Refactor : #83/parsing error 종료 코드 설정
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Minishell backlog Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠 Refactor 코드 리팩토링
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant