I have a multi-process program that runs 4 processes that should return exit value.
But when process reaches exit(int) line it actually returns other value to wait()
For example:
exit(1) will give value of 256 to wait()
exit(3) - 768
exit(4) - 1024
and so on. I guess it returns a value in exit(int) multiplied by 256.
Why this happens and how to fix(?) this?