Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37559684
en ru br
ALT Linux repos
S:1.3.2-alt1
5.0: 0.5-alt1
4.1: 0.3.6.2-alt2
4.0: 0.3.6.2-alt1.M40

Group :: Graphical desktop/Other
RPM: pcmanfm

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: 0003-main-set-the-GIOChannel-encoding-to-binary.patch
Download


From be8c60d588fc6b527d1cc77df9935bcfa66d52be Mon Sep 17 00:00:00 2001
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
Date: Sun, 22 Mar 2020 16:46:48 +0900
Subject: [PATCH 3/3] main: set the GIOChannel encoding to binary
https://developer.gnome.org/glib/stable/glib-IO-Channels.html#g-io-channel-set-encoding
says the default encoding is UTF-8, and setting encoding to NULL is safe
use with binary data.
Actually without setting encoding to NULL, on Fedora 32, trying to terminate pcmanfm with
Ctrl-C (SIGINT) causes pcmanfm hang at g_io_channel_read_chars() in on_unix_signal(),
and this is now causing system reboot delayed for 90 seconds with systemd.
---
 src/pcmanfm.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/src/pcmanfm.c b/src/pcmanfm.c
index 9be80f7..08a7fc3 100644
--- a/src/pcmanfm.c
+++ b/src/pcmanfm.c
@@ -3,6 +3,7 @@
  *
  *      Copyright 2009 - 2010 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
  *      Copyright 2012-2015 Andriy Grytsenko (LStranger) <andrej@rep.kiev.ua>
+ *      Copyright 2020 Mamoru TASAKA <mtasaka@fedoraproject.org>
  *
  *      This program is free software; you can redistribute it and/or modify
  *      it under the terms of the GNU General Public License as published by
@@ -239,6 +240,7 @@ int main(int argc, char** argv)
     {
         GIOChannel* ch = g_io_channel_unix_new(signal_pipe[0]);
         g_io_add_watch(ch, G_IO_IN|G_IO_PRI, (GIOFunc)on_unix_signal, NULL);
+        g_io_channel_set_encoding(ch, NULL, NULL);
         g_io_channel_unref(ch);
 
         /* intercept signals */
-- 
2.25.4
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin