On 11/4/20 4:02 AM, Mariusz Tkaczyk wrote: > If mdadm is run by udev or systemd, it gets a pipe as each stream. > Forks in the background may run after an event or service has been > processed when udev is detached from pipe. As a result process > fails quietly if any message is written. > To prevent from it, each fork has to close all parent streams. Leave > stderr and stdout opened only for debug purposes. > Unify it across all forks. Introduce other descriptors detection by > scanning /proc/self/fd directory. Add generic method for > managing systemd services. > > Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@xxxxxxxxx> > --- > Grow.c | 52 +++------------------ > Incremental.c | 1 + > Monitor.c | 5 +- > mdadm.h | 10 ++++ > mdmon.c | 9 +--- > util.c | 124 ++++++++++++++++++++++++++++++++------------------ > 6 files changed, 100 insertions(+), 101 deletions(-) Applied! Thanks, Jes