Ticket #1657 (new bug)

Opened 12 years ago

Last modified 11 years ago

Make it so that Parrot on RTEMS does not call the system exit()

Reported by: dukeleto Owned by: bubaflub
Priority: normal Milestone:
Component: core Version: 2.4.0
Severity: medium Keywords: RTEMS
Cc: Language:
Patch status: Platform:

Description

There are various ways to make this happen, and various levels of configurability, such as allowing a custom exit handler, but for starters, we just want Parrot on RTEMS to unconditionally not call the system exit() when shutting down, as this causes RTEMS to reboot.

Other tickets can be opened for a more features in the future.

Change History

Changed 12 years ago by dukeleto

exit() is called on line 96 of src/exit.c . A compile-time macro should be put in that calls exit() unless the current OS is RTEMS.

Changed 12 years ago by bacek

There is also some calls to exit inside src/gc...

Changed 12 years ago by julian.notfound@…

>  There are various ways to make this happen, and various levels of
>  configurability, such as allowing a custom exit handler, but for starters,
>  we just want Parrot on RTEMS to unconditionally not call the system exit()
>  when shutting down, as this causes RTEMS to reboot.

Note that according to the docs all calls to exit or _exit are wrong.
The documented way to exit is to return control to whoever run the
first runloop on the main interpreter. The current behavior is wrong,
it breaks not only rtems, but embedding usages that wants to keep
running is spite of whatever happens in the parrot code.

So I think we must fix the full issue, not just making a special case for RTEMS.

-- 
Salu2

Changed 11 years ago by jkeenan

Commenters/committers:

Could we get an update on the status of this ticket?

Thank you very much.

kid51

Changed 11 years ago by plobsing

This is not an RTEMS-specific problem. Any embedding application (irssi, vim, apache, perl5, etc) also wants more control over what happens when parrot exits.

We should require a hook be installed on init by the parent application (and there is always a parent application, parrot.exe being a particularly simple one) to determine what happens in these cases.

Changed 11 years ago by jkeenan

  • keywords RTEMS added
Note: See TracTickets for help on using tickets.