[gccsdk] Recursion of SIGSEV

Ron gettingchoppy at gmail.com
Thu Nov 19 16:53:02 PST 2015


In message <20151118005115.GR17806 at chiark.greenend.org.uk>
          Theo Markettos <theo at markettos.org.uk> wrote:

> On Tue, Nov 17, 2015 at 08:07:07PM +1200, Ron wrote:
> > Something that I haven't tried yet, but apparently the system() call
> > works differently. I'n not sure if there is an OSLib version that is
> > different to the gcc version.
>
> AIUI:
>
> UnixLib's system() does all the necessary moving of memory to enable
> chaining programs - moving memory around in the task slot to allow loading
> the new program at &8000, executing it, and then returning after.
>
> I think SharedCLibrary does this also, but in a less comprehensive way (no
> fork() or exec(), no pipes beyond stdio, etc).
>
So it does have it's own system() representation
I think you might run into lack of support for several other
unix functions if linking with SharedCLibrary so would only be useful in
simple cases.

I think unixlib fork() is fine for simple cases anyway, Some loads seem to lead to sigsev errors. Looking at the backtrace can reveal the general area that things have gone awry, I made an improvement once by removing a uid? check, and I think that fork() is likely to go wrong in the heavier linux ports rather than in simple test cases for fork functionality.

> OSLib will allow you to call OS_CLI - you can call commands from modules,
> Obey files or transient Utilities, but if you call an AIF binary it'll never
> return.  It's similar to calling OS_CLI from BASIC in this respect.
>
A fork doesn't return either, but I think a signal is raised when it is
completed so wait() can work.
You would have to do something similar by setting a variable in the child and monitoring for it, or something more sophisticated, (like ifping).

> > I haven't been seeing these posts of mine to gcc at gccsdk.riscos.info, so
> > this is a test also.
>
> Looks fine to me.  You can always check in the archive:
> http://www.riscos.info/pipermail/gcc/
> You can set Mailman not to send you your own messages - maybe you have this
> turned on?
>
> Theo

I eagerly logged into the web interface for my settings but this is set to yes.
So I set the 'acknowledge a post' to yes and will see what happens now.
I changed my email address recently, and it has likely been a problem since then.

Ron M.






More information about the gcc mailing list