summaryrefslogtreecommitdiff
path: root/src/plugins/scripts
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-04-12 14:08:26 +0200
committerSebastien Helleu <flashcode@flashtux.org>2010-04-12 14:08:26 +0200
commitea3588a8d76062ee911f14201a9327453cbfdf92 (patch)
tree5021472b239074df75ad3fc8bd8595d3b3e88844 /src/plugins/scripts
parent339e42df76a72a3cecf168d6c2164554d52b84ee (diff)
downloadweechat-ea3588a8d76062ee911f14201a9327453cbfdf92.zip
Fix crash on /quit or unload of Perl plugin under FreeBSD and Cygwin (bug #29467)
Diffstat (limited to 'src/plugins/scripts')
-rw-r--r--src/plugins/scripts/perl/weechat-perl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/scripts/perl/weechat-perl.c b/src/plugins/scripts/perl/weechat-perl.c
index 01210bd26..5fef4e7c6 100644
--- a/src/plugins/scripts/perl/weechat-perl.c
+++ b/src/plugins/scripts/perl/weechat-perl.c
@@ -892,8 +892,12 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
perl_main = NULL;
}
#endif
-
-#ifdef PERL_SYS_TERM
+
+#if defined(PERL_SYS_TERM) && !defined(__FreeBSD__) && !defined(WIN32) && !defined(__CYGWIN__)
+ /*
+ * we call this function on all OS, but NOT on FreeBSD or Cygwin,
+ * because it crashes with no reason (bug in Perl?)
+ */
if (perl_quit_or_upgrade)
PERL_SYS_TERM ();
#endif