I am trying to run the Yaswi
http://search.cpan.org/~salva/Language-Prolog-Yaswi-0.14/Yaswi.pm
module in mod_perl,

use CGI qw(:standard);
print header;

use Language::Prolog::Yaswi qw(:query :run);
use Language::Prolog::Types::overload;
use Language::Prolog::Sugar functors => { equal => '=',
                                            is    => 'is' },
                              chains => { orn => ';',
                                          andn => ',',
                                          add => '+' },
                              vars => [qw (X Y Z)];
        
swi_set_query( equal(X, Y),
                 orn( equal(X, 27),
                      equal(Y, 'hello')));

while (swi_next) {
      printf "Query=".swi_query()."\n";
      printf "  X=%_, Y=%_\n\n", swi_var(X), swi_var(Y);
}




at first I got error

[PROLOG SYSTEM ERROR:  Thread 1
        Recursively received fatal signal 11

PROLOG STACK:
]


It happend to solve that problem in Java, we need to add -nosignals
So I add
swi_init('-nosignals');

But now I got errors of
[Thu May 22 17:07:48 2008] [notice] child pid 13466 exit signal
Segmentation fault (11)
[Thu May 22 17:07:48 2008] [notice] child pid 13492 exit signal
Segmentation fault (11)
[Thu May 22 17:07:48 2008] [notice] child pid 13493 exit signal
Segmentation fault (11)
[Thu May 22 17:07:48 2008] [notice] child pid 13494 exit signal
Segmentation fault (11)
[Thu May 22 17:07:48 2008] [notice] child pid 13495 exit signal
Segmentation fault (11)


Is it possible to run Yaswi in mod_perl ? I got not problem when using
CGI, Thanks.

Reply via email to