Hello StackOverflow community.
I am actually working on a project trying to emulate a very basic shell. I have an exit builtin that take a parameter and based on this I need to return the correct value (value % 256)
For example :
exit 42 will return 42
exit 300 will return 44
But I can't find exactly how this is exactly working is someone was trying to do exit -30 for example. I did some test and found out it was 226 beside the fact that it's 256 - 30 where it comes from ?