42shpimanmls / 42sh

Shell project at 42
3 stars 0 forks source link

get_hostname is useless on Mac #162

Closed lsimonne closed 7 years ago

lsimonne commented 7 years ago

didn't find how to get the hostname except with uname (in man 3, but since it's a bit of a bonus maybe we can use it ...) whatever we do about that, we should protect the read syscall! (otherwise errno is set and a message can be wrongly displayed)

pilespin commented 7 years ago

si c'est un bonus utilisé des extra peut etre justifiable

pilespin commented 7 years ago

si c'est pour le -1 check la valeur du fd avant de read

lsimonne commented 7 years ago

oui c'est fait ça

pilespin commented 7 years ago

close?

pilespin commented 7 years ago

uname > uname dans le makefile read uname set variable dans l'init

lsimonne commented 7 years ago

osef, bonus ˆˆ

pilespin commented 7 years ago

fixed #182