Closed n0izn0iz closed 7 years ago
c'est le retour du random travis fail :/ https://travis-ci.org/42shpimanmls/42sh/builds/220715109 a voir après le merge de #118
Doesn't works on my side.
What doesn't work @M5oul ??
Following the example on first post. I don't get 42 at output status.
Make re? can you post log?
➜ 42sh git:(builtin_exit) ./42sh
[ChezLouise@ ~/Documents/42/42sh]$ exit foo
executing builtin exit
➜ 42sh git:(builtin_exit) echo $?
0
bash-3.2$ exit foo
exit
bash: exit: kj: numeric argument required
➜ 42sh git:(builtin_exit) echo $?
255
sinon chez moi le reste fonctionne
If n is specified, but its value is not between 0 and 255 inclusively, the exit status is undefined.
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#exit
ok! par contre faudra faire les valeurs de retour des commandes en cas d'erreur -> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_08_02
yes!
Ok, it works. I don't know why it didn't works.
✘ n0iz@nomad ~/Projects/42sh builtin_exit ● ./42sh
[n0iz@nomad ~/Projects/42sh]$ ./42sh
[n0iz@nomad ~/Projects/42sh]$ exit 42
executing builtin exit
[n0iz@nomad ~/Projects/42sh]$ env | grep ?
?=42
[n0iz@nomad ~/Projects/42sh]$
✘ n0iz@nomad ~/Projects/42sh builtin_exit ● ./42sh
[n0iz@nomad ~/Projects/42sh]$ ./42sh
[n0iz@nomad ~/Projects/42sh]$ exit 42
executing builtin exit
[n0iz@nomad ~/Projects/42sh]$ set | grep ?
executing builtin set
done executing builtin set, ok
?=42
[n0iz@nomad ~/Projects/42sh]$
command not found must be 127
ça c'est pas a exit de s'en occuper
techniquement, c'est pas un problème d'exit, mais d'exécution (cf mon commentaire au-dessus)
Yay!