Question: I started a shell for another user on my system. However there's no systemd user instance for that user:

```
helloer@host $ sudo -u testusr bash
testusr@host $ systemctl --user status
Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host --user to connect to bus of other user)

```

How can I start a dbus or systemd user instance for testusr?

I'm running Arch Linux, linux 5.11.8.arch1-1, dbus 1.12.20-1, systemd 247.4-2.

Answer: 
There are multiple ways for a program to fail. For example `grep` fails if it doesn't find the pattern looked for, or if it can't open one of the files specified.

Presently Unix allows 1 (unsigned) byte of value (the return code) to be passed back from a child to it's parent (I am ignoring the information about which signal killed a child, if a core was generated etc which could get a few more bits back).

As there are multiple ways to fail, it makes sense for there to be multiple return codes to encode these different failures, and to have one return code to indicate success.

It follows that a (`0`) is a reasonable choice to indicate success, the rest (1-255) to indicate failure (and the type of failure).

It would be perfectly possible to use 17 as meaning success, and have 0 through 16 and 18 through 255 meaning failure, but for simplicity 0 was chosen for success and 1 through 255 for the failures so there is a single range. Equally simple would have been to use 255 for success and 0 through 254 for failures. However that would limit future changes to pass back more than 8 bits and keep the simplicity of a single range of failure codes.
I can only think of this rationale and it seems quite strong to me.

The easiest way to translate boolean operations into computer arithmetic is to use `0` for `FALSE` and `1` for `TRUE`, and then all the operations with them make perfect sense, i.e.

```
TRUE  && TRUE =  TRUE  ( 1 * 1 = 1)
TRUE  && FALSE = FALSE ( 1 * 0 = 0)
TRUE  || FALSE = TRUE  ( 1 + 0 = 1)
FALSE || FALSE = FALSE ( 0 + 0 = 0)

```

And so on and so forth.

At the same time programs need multiple exit statuses to report various errors. It's logical to make the correct exit status as `0`, and then use the remaning 255 (unsigned char) as bad exit statuses.

Now of course, `1` could have been made the good exit status but then the bad ones would have become a torn array of `0` and `2..555` which is very illogical.