-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/create envp #163
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
Feature/create envp #163
Conversation
|
私の方でminishellの方のコンパイルエラーと最新Mainのマージ対応はしました。(何ヶ所が出ていたので…) それを踏まえてコードレビュー・動作確認をしました。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
テストコードの確認&コードレビューしました。
ちょっと気になるところがあるので、確認、回答及び修正をお願いします〜
それ以外の部分についてはいい感じに作れていてOKかなと思います!
src/invoke_cmd/create_envp.c
Outdated
|
|
||
| #include "main.h" | ||
|
|
||
| int count_value(t_minish *minish) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここでしか使われていないならstaticつけた方がいいかもです。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
そうですね。修正します
src/invoke_cmd/execute_cmd.c
Outdated
| envp = create_envp(minish); | ||
| if (!envp) | ||
| { | ||
| perror("create_envp"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perrorって確かエラー出力するだけなので、これだと後続の処理が実行されると思いますがこれは想定通りの動作ですか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あ、後ほど作業しようと思って忘れていました。修正します
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
command not foundを出力させて、t_cmdのstausに終了ステータスを入力する処理に修正しました。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
command not foundを出力させて、t_cmdのstausに終了ステータスを入力する処理に修正しました。
ありがとうございます。
ただ、Githubを見る限りだとコミットが私の対応が最新のままになっているので
もう一度pushしてもらってもいいですか?
|
|
||
| #include "main.h" | ||
|
|
||
| static bool is_unit_builtin(t_cmd *cmd_head) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
今後対応予定の関数でしたら以下のように、コメントで書いておくと後でわかりやすいかなと思います。
/**
* @brief 関数の概要
* @param <...>
* @return bool
* @note TODO: 後で実装予定
*/There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
分かりました!
| return (true); | ||
| } | ||
|
|
||
| static int exec_unit_builtin(t_cmd *cmd_head) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こちらも上と同様コメントしておくとわかりやすいかと
/**
* @brief 関数の概要
* @param <...>
* @return bool
* @note TODO: 後で実装予定
*/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
分かりました!
|
修正確認できましたら、再度確認しますね〜 |
おまたせしました。修正してプッシュしました。 |
create_envpがTOO MANY LINESでてるっぽいので対応お願いします💦 |
|
マージで出たっぽいのでちょっとこっちでも見てみますね。 |
|
対応ありがとうございます、コードは良さげなので、最低限の動作確認できたらApprove出します。 |
norm error修正したので確認お願いします。 |
ありがとうございます |
cacapon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OKです!
ボリューム大きい対応でしたがお疲れ様でした!
compile errorを解消するために余計なファイルをプッシュしています。
./test_create_envpするとenvpと一致しているかどうかを確かめられます。