Alarm signal and recv system call
Kostirya <[email protected]> Thu, 15 Nov 2018 13:53:27 +0200
| Newsgroups | gmane.comp.lang.ml.mlton.user |
|---|---|
| Message-ID | <CAG+QnTcLpC-yMeGi49hrdbHfrSzUTa_kDe7oiniO6TPCqKxfOQ@mail.gmail.com> |
I was surprised to find that Alarm signal do not abort recvVec function. How is this possible? I thought recv was always aborted on signal. I use for test: val _ = MLton.Signal.setHandler(Posix.Signal.alrm, MLton.Signal.Handler.simple (fn _ => print "Alarm sig\n")) val _ = Posix.Process.alarm (Time.fromSeconds (Int.toLarge 3)) val r = Socket.recvVec (socket, 1024) val _ = print "Done\n" -- You received this message because you are subscribed to the Google Groups "MLton-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].