New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signals on SGI #2416
Comments
Comment author: administrator
I'd be interested in a program that reproduces the problem. (I have
The idea behind those constants is to provide system-independent It is true that Unix.sigpending and Unix.sigprocmask do not perform Does this explain what you've observed? Best regards,
|
Comment author: administrator Dear Xavier, now I just put together a small demo: =============================== =============================== where the reaction This reaction does not happen on the SGIs --- not even without inlining. Many thanks for looking into this! Best regards, Wolfram ============== signaltest.ml ========================================= (* library extensions begin *) let string_of_intlist ?(sep:sep = " ") is = let list_filter f:f = (* library extensions end *) let mySignal = ref 18;; let block _ = let unblock _ = let init _ = block ();; let signals = [18;19;20;21;22;23;24;25;26;27;33;34];; let poll _ = let rec loop x = let _ = |
Comment author: administrator Dear Xavier, sorry, I forgot to reply to the other part of your message:
It at least explains the negative values and their platform-independence --- It does not explain why 18 works on Sparcs, too, but maybe I misunderstand the However, now I am even slightly more puzzled why Many thanks! Best regards, Wolfram |
Comment author: administrator Thanks for the demo program. I had no problems running it under Linux A few remarks on the program. First, I moved the call to init() after Second, when you unblock the signal in poll(), the action associated As for the different Linux/IRIX behaviors on SIGCHLD, this is normal If the action associated with a blocked signal is Linux chooses to add the ignored signal to the pending set, and IRIX
The idea is that you may still want to use hard-wired signal numbers,
|
Comment author: administrator The behaviors observed are correct according to the Unix98 spec. |
Comment author: administrator
That saved me! Thank you very much!
Sorry --- that slipped into the demo,
That is why I first used SIGCONT and then continued with ignored signals.
This makes sense. Perhaps it would be helpful to document this Another unrelated feature that I thought might deserve mention in the manual I admit that it probably makes sense that the level of low-level UNIX knowledge Thanks a lot for this wonderful system and the prompt and effective help! Best regards, Wolfram |
Original bug ID: 78
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Hello,
a while ago I stumbled upon an internal compiler problem
that occured with heavy inlining, and which you (Damien Doligez) answered:
At the time I did not try it out,
but the current cvs version works perfectly --- many thanks!
Now I am using signals for a certain kind of inter-process communication ---
with signal handlers from the standard library module Sys in one direction,
and with
Unix.sigprocmask mode:Unix.SIG_BLOCK,
Unix.sigpending (), and
Unix.sigprocmask mode:Unix.SIG_UNBLOCK
in the other direction. This works very well on Sparc/Solaris and on Pentium/Linux
but not on SGIs, where I need to get it to work now.
Anyway, even on the other two architectures I do not understand
why it works as it does:
I am using signal 18 on both, which seems to be SIGCONT on Linux,
which is plausible, but should be SIGCHLD on Sparc instead of SIGCONT,
which should be 25 and does not work for my application on Sparc.
No value I tried works on SGI ---
I just did not get any result from Unix.sigpending () there.
(The signal handler direction works with all signals I tried.)
In this context I tried the built-in signal constants in Sys --- with
spectacular failures, so that I inspected their values manually,
and I do not understand these, either:
====================================================================
% uname -a
IRIX64 picasso 6.5 01200532 IP27
% ocaml
Objective Caml version 2.99+15 (2000-04-05)
Sys.sigcont;;
Sys.sigchld;;
Sys.sigint;;
Sys.sigkill;;
Sys.sigterm;;
====================================================================
Sys.sigcont;;
Sys.sigchld;;
Sys.sigint;;
Sys.sigkill;;
Sys.sigterm;;
====================================================================
~~ uname -a
SunOS elektra 5.7 Generic sun4u sparc SUNW,Ultra-250
~~ ocaml
Objective Caml version 2.99+15 (2000-04-05)
Sys.sigcont;;
Sys.sigchld;;
Sys.sigint;;
Sys.sigkill;;
Sys.sigterm;;
====================================================================
Any help would be most welcome!
If you need me to experiment on SGIs, I would be most willing to do so.
(The effect is the same on 32bit SGIs, to which I have access, too:
If necessary, I could also try to produce a smaller program that
exposes the differences in behaviour, but I am afraid that this would have
to wait until next week.
Best regards,
Wolfram
The text was updated successfully, but these errors were encountered: