gnumeric r16737 - trunk/plugins/perl-loader
- From: jdassen svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r16737 - trunk/plugins/perl-loader
- Date: Tue, 19 Aug 2008 13:04:34 +0000 (UTC)
Author: jdassen
Date: Tue Aug 19 13:04:34 2008
New Revision: 16737
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16737&view=rev
Log:
Call PERL_SYS_INIT3() prior to perl_parse(), as per perlembed(1). Without
this, calling perl_parse() will hang inside pthread_mutex_lock() on the HPPA
architecture. See http://bugs.debian.org/486069 for background.
Modified:
trunk/plugins/perl-loader/ChangeLog
trunk/plugins/perl-loader/perl-loader.c
Modified: trunk/plugins/perl-loader/perl-loader.c
==============================================================================
--- trunk/plugins/perl-loader/perl-loader.c (original)
+++ trunk/plugins/perl-loader/perl-loader.c Tue Aug 19 13:04:34 2008
@@ -191,12 +191,15 @@
{
char *argv[] = { (char*)"", NULL, NULL, NULL };
char const *arg;
+ int argc;
arg = go_plugin_get_dir_name (go_plugin_loader_get_plugin (loader));
argv[1] = g_strconcat ("-I", arg, NULL);
argv[2] = g_build_filename (arg, "perl_func.pl", NULL);
+ argc = 2;
if (g_file_test (argv[2], G_FILE_TEST_EXISTS)) {
+ PERL_SYS_INIT3(&argc, &argv, NULL);
gnm_perl_interp = perl_alloc ();
perl_construct (gnm_perl_interp);
perl_parse (gnm_perl_interp, xs_init, 3, argv, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]