<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection"><font face="Palatino, serif">So hypothetically it should be fine with the hlc.gc grade to use a simple ’stub’ for `signal` or `sigaction` to placate the linker. Unfortunately the Boehm GC test function `GC_is_visible`, used during the mercury run time init process, is not succeeding. Is it safe to assume that this problem has nothing to do with signals then?</font></div>
<div name="messageSignatureSection"><br />
<font face="Palatino, serif">Thanks,</font>
<div dir="auto"><font face="Palatino, serif">Patrick</font></div>
</div>
<div name="messageReplySection">On Mar 30, 2020, 4:53 PM -0700, Peter Wang <novalazy@gmail.com>, wrote:<br />
<blockquote type="cite" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">On Mon, 30 Mar 2020 00:42:09 -0700, Patrick Henning <path@fea.st> wrote:<br />
<blockquote type="cite" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;">Does Mercury need `signal` in the absence of `sigaction`? If so, the porting may not be possible currently since neither of these are implemented for emscripten unfortunately.<br /></blockquote>
<br />
The runtime will use signal if sigaction is not available;<br />
see MR_set_signal_action.<br />
<br />
The runtime does set up signal handlers for SIGSEGV/SIGBUS to display an<br />
error message in case of a crash, but is not really required.<br />
<br />
Time profiling grades (.prof) need to set a signal handler for a timer<br />
signal (see MR_init_time_profile_method), so you could not use those<br />
grades.<br />
<br />
Parallel grades (.par) will need to set signal handlers which are used<br />
in the stop-the-world implementation for GC, so you could not those<br />
grades.<br />
<br />
Debugging grades set a couple of signal handlers.<br />
<br />
Peter<br /></blockquote>
</div>
</body>
</html>