diff options
author | Alejandro Colomar <alx@kernel.org> | 2024-04-24 23:31:54 +0200 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2024-06-18 22:59:45 +0200 |
commit | d96d583328f614c658d42f5bb0d2a0f81621327e (patch) | |
tree | 66cacc47d4579dceec618035d3c505d7a3f88dbe /src/nxt_unit.c | |
parent | 2e2e5d1e8e862c5d55cda0035eef90c5b6596112 (diff) | |
download | unit-d96d583328f614c658d42f5bb0d2a0f81621327e.tar.gz unit-d96d583328f614c658d42f5bb0d2a0f81621327e.tar.bz2 |
Use octal instead of mode macros
They are more readable.
And we had a mix of both styles; there wasn't really a consistent style.
Tested-by: Andrew Clayton <a.clayton@nginx.com>
Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'src/nxt_unit.c')
-rw-r--r-- | src/nxt_unit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nxt_unit.c b/src/nxt_unit.c index 50e156d8..966a6c0f 100644 --- a/src/nxt_unit.c +++ b/src/nxt_unit.c @@ -3857,7 +3857,7 @@ nxt_unit_shm_open(nxt_unit_ctx_t *ctx, size_t size) #elif (NXT_HAVE_SHM_OPEN_ANON) - fd = shm_open(SHM_ANON, O_RDWR, S_IRUSR | S_IWUSR); + fd = shm_open(SHM_ANON, O_RDWR, 0600); if (nxt_slow_path(fd == -1)) { nxt_unit_alert(ctx, "shm_open(SHM_ANON) failed: %s (%d)", strerror(errno), errno); @@ -3870,7 +3870,7 @@ nxt_unit_shm_open(nxt_unit_ctx_t *ctx, size_t size) /* Just in case. */ shm_unlink(name); - fd = shm_open(name, O_CREAT | O_EXCL | O_RDWR, S_IRUSR | S_IWUSR); + fd = shm_open(name, O_CREAT | O_EXCL | O_RDWR, 0600); if (nxt_slow_path(fd == -1)) { nxt_unit_alert(ctx, "shm_open(%s) failed: %s (%d)", name, strerror(errno), errno); |