Re: PSA: Do not run 'dnf update' inside GNOME, KDE or any other graphical desktop on Fedora 24

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

 



Once upon a time, Sam Varshavchik <mrsam@xxxxxxxxxxxxxxx> said:
> I can make any process survive an X shutdown, using an amazing tool
> called "tmux".
> 
> Why can't dnf do the same?

Because dnf would have to reimplement tmux's (or screen's) TTY handling,
which is far outside the scope of a package manager.  If you want to run
dnf under tmux/screen, then run it under tmux/screen.

> You do not need atomic updates to install a signal handler for
> SIGHUP or SIGTERM. And maybe issue a setsid() call, beforehand.

That's not enough.  dnf prints running information to standard
out/error, which are connected to the terminal via a TTY.  As soon as
the terminal process is killed, the TTY is closed, and the next write by
dnf will cause an error.

Now, the error could be ignored, but it is hard to say there's a
legitimate path to follow after such an error.  A system-level program
like dnf should generally not ignore such errors.  Any RPM script that
writes to standard out/error (they're not supposed to do that, but some
do, sometimes inadvertently) will also fail.

If you want dnf to survive the terminal exiting, run it under something
that handles that, like tmux or screen.  Heck, alias dnf to "screen dnf"
(or the tmux equivalent) if you like.  Don't try to make dnf reimplement
all that functionality.

-- 
Chris Adams <linux@xxxxxxxxxxx>
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux