One thing that I can think of is the threading issue here. xerces-c is a
multi-threaded library. On some unix the application also needs to be linked
and compiled with proper multi-threaded options for problems of this kind to
go away. On some cases at our end a problem on solaris went away by calling
"sigignore(SIGALRM); " in the application before initialization. I'm not an
expert in signals, so can't really depict this behaviour.

Arundhati

PS: Pls, switch to xerces-c-dev@xml.apache.org for c related issues.

[EMAIL PROTECTED] wrote:

> That's completely beyond the scope of my tiny brain :-) Anybody got any
> ideas? I would assume its some sort of build flag stuff or something like
> that? Or what libraries are being brought in?
>
> ----------------------------------------
> Dean Roddey
> Software Weenie
> IBM Center for Java Technology - Silicon Valley
> [EMAIL PROTECTED]
>
> John Ward <[EMAIL PROTECTED]>@e3.ny.us.ibm.com on 04/04/2000 03:17:15 PM
>
> Please respond to [EMAIL PROTECTED]
>
> Sent by:  [EMAIL PROTECTED]
>
> To:   [EMAIL PROTECTED]
> cc:
> Subject:  xerces linking side effect ...
>
> I'm having some real trouble with mixing signals and xerces.
>
> I've attached a sample program (small) that sets up a signal handler to
> printout a message when a signal is caught.  I get different results
> depending on whether or not I link with the xerces library or not
> (!NOTE! this sample code does  nothign with xerces other than link to
> it!)
>
> When I run the test program which simply sets up a handler for all
> signals between 0 and SIGRTMAX (0 to 64 or so) I then send corresponding
> kill signals to the program and watch them get caught by the handler and
> thus printed out.
>
> When I send kill -32 <pid> for some reason the handler doesn't get
> called.
>
> Same with single 33, and 34 ... but ALL of the rest of them get printed
> out.
>
> Why am I asking this to a xerces person? well this behavior ONLY happens
> when I link with the xerces library.  MOST ODD!
>
> My compile line is as follows:
>
> gcc test.c -L/xerces/lib -lxerces-c1_1
>
> I'm using xerces 1_1_0 for linux.
>
> Please note this is a sample of the problem, my larger program uses
> xerces (obviously) but I was just trying to narrow the problem down, and
> that's how I ended up isolating the xerces lib ... unless I'm missing
> something here.  I'd love to see if someone can duplicate it.
>
> Thanks for any help in advance,
> John Ward
> [EMAIL PROTECTED]
>
> --------------------
> #include <stdio.h>
> #include <signal.h>
>
> void SignalHandler(int sig)
>      fprintf(stdout, "Handler, sig = %d\n", sig);
> }
>
> main(int argc, char **argv) {
>      struct sigaction act;
>
>      int i;
>
>      sigfillset(&act.sa_mask);
>      act.sa_handler = MyStupidSignalHandler;
>      act.sa_flags = 0;
>
>      for (i = 0; i < SIGRTMAX; i++) {
>           if (sigaction(i, &act, NULL) == -1) {
>                fprintf(stdout, "can't sigact %d\n", i);
>           }
>      }
>
>      while (1) {
>
>      }
> }

Reply via email to