caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: oliver <oliver@first.in-berlin.de>
To: Gabriel Kerneis <kerneis@pps.jussieu.fr>
Cc: Jeremie Dimino <jdimino@janestreet.com>,
	caml-list@inria.fr, ocsigen@inria.fr
Subject: Re: [Caml-list] BUG in unix.ml (was: strange errors when linking lwt.unix)
Date: Fri, 15 Mar 2013 17:00:45 +0100	[thread overview]
Message-ID: <20130315160045.GA5664@siouxsie> (raw)
In-Reply-To: <20130315154414.GB6473@kerneis.info>

On Fri, Mar 15, 2013 at 03:44:14PM +0000, Gabriel Kerneis wrote:
> Oliver,
> 
> > I don't know why you are telling me this.
> > i did not asked about it.
> 
> Jérémie is kindly trying to show you why you are mistaken.

I did not see it from his explanation that signal(2) is not called.



> When you say:
> 
> > > > Just by your activation of signal function - not blocking, but handling
> > > > "Sys.Signal_handle" but with the unreliable signal semantics this has
> > > > cause the problems.
> > > >
> > > > signal(2) opened the pandoras box.
> 
> This is wrong.  Because OCaml does not call signal(2).  At all.  So there is no
> "pandora box" to open, no "unreliable signal semantics" used.
> 
>           Sys.set_signal = sigaction(2)
>                          ≠ signal(2)


From this kind of explanation I see more.

The problem occures when using the signal handler from Sys,
not from unix module.
It was stated that the unix module is doing things wrong.
But the Unix signalling mechanism was not used.

I wait for an example which uses Unix module for the signals
and fails.

have not seen it so far.

So, then interaction of Sys- and Unix.-module may be a problem.

But the Code did not used Unix-module.

So it's also wrong to state Unix module makes problems and is buggy,
if the example don't uses it for the signal handling.

I had the assumption that Sys-module uses signal(2).
It may be wrong (did not eplored the sources).
But then there is the problem, not in Unix-module.

Also I wonder why threads were mentioned.
In the test code via the list was nothing from Thread-module
involved.



> 
> (And sigprocmask(2) is irrelevant here: it is also part of the "reliable
> semantics", but does something different from sigaction(2), as Jérémie told
> you.)

I never said that sigrpocmask or sigactiona re non-reliable.

signal(2) is non-reliable.
That was my point, toigether with Assumption of signal(2) in Sys-sighandlers.




> 
> > But if you wish to explain it to yourself, go on.
> 
> You are not only rude but also completely missing the point here.

You also missed my point.

What I have overlooked at the beginning was, that
Sys.* was used and not Unix.*
and when I saw that later, I was a bit astouned and confused.

So I removed the Sys.* signal stuff.
Then there was no problem in the code.

I'm still waiting for the code that shows that unix.ml is buggy.

If Sys.<signalstuff> is also using sigprocmask/sigactio/sig[^nal]foobar
then Sys.* is the problem.

That was my point.

Maybe I was not clear in explaining this.

So... back to beginning of the Thread:  where is Unix module failing on signals?

Ciao,
   Oliver

  reply	other threads:[~2013-03-15 16:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAMu2m2Lt8oty_2mEQq8H1oV0-1Rjrf10ai543me9YxB1Nb5xfg@mail.gmail.com>
     [not found] ` <CALScVY=c1M=HAqMeM7x4QrxDTZsn0rB=HcTsQYheYUOBSBFRUQ@mail.gmail.com>
     [not found]   ` <CALScVYnt-m-dRR41rBPo5R3xDx-81tMwBFbM3q+5p4gRqsQC9w@mail.gmail.com>
     [not found]     ` <CALScVYmU7zEXbgdS21gGrq8iFvgVs0FWieKipRE9WtOM+PxeEg@mail.gmail.com>
2013-03-15  9:18       ` Florian Hars
2013-03-15 10:02         ` oliver
2013-03-15 10:11           ` David House
2013-03-15 11:38         ` Jeremie Dimino
2013-03-15 12:43           ` oliver
2013-03-15 13:17             ` Jeremie Dimino
2013-03-15 13:28               ` oliver
2013-03-15 13:43                 ` Jeremie Dimino
2013-03-15 13:24             ` Jeremie Dimino
2013-03-15 13:58               ` oliver
2013-03-15 14:05                 ` oliver
2013-03-15 14:16                   ` Jeremie Dimino
2013-03-15 14:18                     ` oliver
2013-03-15 14:17               ` oliver
2013-03-15 14:27                 ` oliver
2013-03-15 15:05                   ` Jeremie Dimino
2013-03-15 15:11                     ` oliver
2013-03-15 15:44                       ` Gabriel Kerneis
2013-03-15 16:00                         ` oliver [this message]
2013-03-15 16:12                           ` Gabriel Kerneis
2013-03-15 16:25                             ` oliver
2013-03-15 17:28                               ` Jeremie Dimino
2013-03-15 15:16                     ` oliver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130315160045.GA5664@siouxsie \
    --to=oliver@first.in-berlin.de \
    --cc=caml-list@inria.fr \
    --cc=jdimino@janestreet.com \
    --cc=kerneis@pps.jussieu.fr \
    --cc=ocsigen@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).