]> git.kaiwu.me - nginx.git/commitdiff
Core: fixed ioctl(FIOASYNC) argument type
authorAleksei Bavshin <a.bavshin@nginx.com>
Thu, 1 Oct 2026 19:49:15 +0000 (12:49 -0700)
committerAleksei Bavshin <a.bavshin@f5.com>
Thu, 15 Oct 2026 15:35:38 +0000 (08:35 -0700)
The documented argument type for this operation is an integer boolean.
Passing 1 as u_long makes the call silently fail on 64-bit big-endian
platforms, as the kernel receives only high 4 bytes set to 0.

src/os/unix/ngx_process.c

index 15680237a6ba8339fcdbf5092ef282e4d32b7d9c..082de27a028e6bf5f4719181743a517e8cf7e877 100644 (file)
@@ -87,7 +87,7 @@ ngx_pid_t
 ngx_spawn_process(ngx_cycle_t *cycle, ngx_spawn_proc_pt proc, void *data,
     char *name, ngx_int_t respawn)
 {
-    u_long     on;
+    int        on;
     ngx_pid_t  pid;
     ngx_int_t  s;