limits after which it will refuse operation. It's fine if it is hard-coded
(at least initially), but it needs to be there. This is particularly
important for objects that unprivileged users may allocate, but also matters
- for everything else any user may allocated.
+ for everything else any user may allocate.
## Types
- Use the bool type for booleans, not integers. One exception: in public
headers (i.e those in `src/systemd/sd-*.h`) use integers after all, as `bool`
- is C99 and in our public APIs we try to stick to C89 (with a few extension).
+ is C99 and in our public APIs we try to stick to C89 (with a few extensions).
## Deadlocks
process, please use `_exit()` instead of `exit()`, so that the exit handlers
are not run.
-- We never use the POSIX version of `basename()` (which glibc defines it in
+- We never use the POSIX version of `basename()` (which glibc defines in
`libgen.h`), only the GNU version (which glibc defines in `string.h`). The
only reason to include `libgen.h` is because `dirname()` is needed. Every
time you need that please immediately undefine `basename()`, and add a
- Never use `FILENAME_MAX`. Use `PATH_MAX` instead (for checking maximum size
of paths) and `NAME_MAX` (for checking maximum size of filenames).
`FILENAME_MAX` is not POSIX, and is a confusingly named alias for `PATH_MAX`
- on Linux. Note the `NAME_MAX` does not include space for a trailing `NUL`,
+ on Linux. Note that `NAME_MAX` does not include space for a trailing `NUL`,
but `PATH_MAX` does. UNIX FTW!
## Committing to git