Re: [PATCH v3] util: Block SIGPIPE until execve in childprocess

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> The fork'd child process inherits all signal handlers from the parent.
> These handlers may no longer be valid since we are mass-closing all
> file descriptors. We thus need to kill off all the signal handlers
> in the forkd child.
>
> There's a window between fork & sigaction where signals can still
> get delivered to the child & run the undesirable handlers. So we must
> mask all signals immediately before fork, only unmasking them after
> we have set all signal handlers back to their defaults.
>
> We just need to set SIGPIPE to a dummy no-op handler before this
> unmask

If do that, i think the SIGPIPE ignored code before running hooks in virExec()
can be removed.

---
Best wishes
Wang Yechao
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux