Reading compressed character maps and gzip EPIPE issues.
Florian Weimer
fw@deneb.enyo.de
Sat Nov 23 20:24:00 GMT 2019
* Carlos O'Donell:
> Current localedef uses posix_spawnp, which uses vfork, which blocks
> all signals while it starts the child. Should we be setting the
> signal mask appropriately for posix_spawnp so SIGPIPE can reach
> gzip? Is that what we're getting at?
I'm pretty sure that posix_spawnp does not block signals in this way.
If it does, it would be a bug. strace shows this (with current
master):
30925 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
30925 execve("/usr/local/bin/gzip", ["gzip", "-d", "-c"], 0x7ffe16fec8f8 /* 47 vars */) = -1 ENOENT (No such file or directory)
30925 execve("/usr/bin/gzip", ["gzip", "-d", "-c"], 0x7ffe16fec8f8 /* 47 vars */) = -1 ENOENT (No such file or directory)
30925 execve("/bin/gzip", ["gzip", "-d", "-c"], 0x7ffe16fec8f8 /* 47 vars */ <unfinished ...>
This suggests to me that posix_spawnp properly restores the signal
mask. I think you need to investigate why your environment runs
localedef with SIGPIPE blocked.
More information about the Libc-alpha
mailing list