Skip to content
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 are not delivered for corresponding events #48

Closed
1 of 5 tasks
JohnReppy opened this issue Jul 15, 2022 · 0 comments
Closed
1 of 5 tasks

Signals are not delivered for corresponding events #48

JohnReppy opened this issue Jul 15, 2022 · 0 comments
Assignees
Labels
bug Something isn't working fixed-in-110.99.3 issues that will be fixed in the 110.99.3 version gforge bug (or feature request) ported from smlnj-gforge repository

Comments

@JohnReppy
Copy link
Contributor

JohnReppy commented Jul 15, 2022

Version

110.85/110.98.1

Operating System

  • All
  • Linux
  • macOS
  • Windows
  • Other Unix

OS Version

other Windows 10

Processor

x86 (32-bit)

Component

Other

Severity

Major

Description of the problem

No sigALRM nor sigGC will be delivered to installed handlers,
when an interval timer is set by "setIntTimer" or
garbage collection is enforced by "doGC".

The behavior is the same in 110.85 for Windows 10 (pasted as
atranscript), 110.98.1 (both the 32/64 version) for Linux.
Additional comments:
As for sigGC, it has been reported in #81 (gforge bug 65).

Transcript

Standard ML of New Jersey v110.85 [built: Fri Dec 21 20:19:39 2018]
- open Signals
= open SMLofNJ.IntervalTimer
= open SMLofNJ.Internals.GC;
[autoloading]
[library $SMLNJ-BASIS/basis.cm is stable]
[library $SMLNJ-BASIS/(basis.cm):basis-common.cm is stable]
[autoloading done]
opening Signals
  eqtype signal
  datatype sig_action
    = DEFAULT
    | HANDLER of signal * int * unit ?.Cont.cont -> unit ?.Cont.cont
    | IGNORE
  val listSignals : unit -> signal list
  val toString : signal -> string
  val fromString : string -> signal option
  val setHandler : signal * sig_action -> sig_action
  val overrideHandler : signal * sig_action -> sig_action
  val inqHandler : signal -> sig_action
  datatype sigmask = MASK of signal list | MASKALL
  val maskSignals : sigmask -> unit
  val unmaskSignals : sigmask -> unit
  val masked : unit -> sigmask
  val pause : unit -> unit
  val sigINT : signal
  val sigALRM : signal
  val sigTERM : signal
  val sigGC : signal
opening SMLofNJ.IntervalTimer
  val tick : unit -> Time.time
  val setIntTimer : Time.time option -> unit
opening SMLofNJ.Internals.GC
  val doGC : int -> unit
  val messages : bool -> unit
-
- fun laterSec x = let open Time in now() + fromSeconds x end ;
val laterSec = fn : IntInf.int -> Time.time
- fun prt x = (TextIO.output(TextIO.stdOut,x); TextIO.flushOut TextIO.stdOut);
[autoloading]
[autoloading done]
val prt = fn : TextIO.vector -> unit
-
- val _ = setHandler (sigALRM, HANDLER(fn z => (prt "tm";#3 z)  )) ;
- val _ = setHandler (sigGC  , HANDLER(fn z => (prt "gc";#3 z)  )) ;
-
- unmaskSignals (MASK [sigALRM, sigGC]);
val it = () : unit
-
- val _ = setIntTimer (SOME (laterSec 10));  (* nothing will happen *)
- val _ = doGC 10; (* also nothing happens *)
tm-
-

Expected Behavior

No response

Steps to Reproduce

open Signals
open SMLofNJ.IntervalTimer
open SMLofNJ.Internals.GC;

fun laterSec x = let open Time in now() + fromSeconds x end ;
fun prt x = (TextIO.output(TextIO.stdOut,x); TextIO.flushOut TextIO.stdOut);

val _ = setHandler (sigALRM, HANDLER(fn z => (prt "tm";#3 z)  )) ;
val _ = setHandler (sigGC  , HANDLER(fn z => (prt "gc";#3 z)  )) ;

unmaskSignals (MASK [sigALRM, sigGC]);

val _ = setIntTimer (SOME (laterSec 10));  (* nothing will happen *)
val _ = doGC 10; (* also nothing happens *)

Additional Information

No response

Email address

saitohm@sun.ac.jp

Comments from smlnj-gforge

Original smlnj-gforge bug number 291

Submitted via web form by Masaya Saito saitohm@sun.ac.jp on 2021-08-15 at 11:18:00

Keywords: structure Signals

comment by @JohnReppy on 2022-06-01 23:04:00 +000 UTC

Also see issue #81 (gforge bug 65)

comment by @JohnReppy on 2022-06-27 15:44:00 +000 UTC

I was not able to reproduce the problem with sigALRM (it works for me), but support for sigGC has been added in 110.99.3 and 2022.1.

@JohnReppy JohnReppy added bug Something isn't working gforge bug (or feature request) ported from smlnj-gforge repository labels Jul 15, 2022
@JohnReppy JohnReppy self-assigned this Jul 15, 2022
@JohnReppy JohnReppy added the fixed-in-110.99.3 issues that will be fixed in the 110.99.3 version label Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed-in-110.99.3 issues that will be fixed in the 110.99.3 version gforge bug (or feature request) ported from smlnj-gforge repository
Projects
None yet
Development

No branches or pull requests

1 participant