Re: [Vala] Vala on OpenIndiana Updated
> On Wednesday, August 16, 2017, 4:58:59 PM GMT+1, Jason Martin >wrote: > Maybe a good vala example (someone more qualified than me) of trapping > signals would be handy? This is an example of handling some signals, but not an example for SIGSEGV. The documentation for GLib.Unix.SignalSource states "In GLib versions before 2.36, only `SIGHUP`, `SIGINT`, `SIGTERM` can be monitored. In GLib 2.36, `SIGUSR1` and `SIGUSR2` were added. In GLib 2.54, `SIGWINCH` was added." The example is in Genie, so significant leading whitespace and types are declared after the identifier with a colon. Save as unix_signal_example.gs and compile like any other Vala program: [indent = 4] init var main = new MainLoop() var handler = new SignalHandler( main ) Unix.signal_add( Posix.SIGINT, handler.quit ) print (@"To end the process use: kill -2 $((int)Posix.getpid()) or CTRL+C") main.run() class SignalHandler _mainloop:MainLoop construct( mainloop:MainLoop ) _mainloop = mainloop def quit():bool print( @" Process $((int)Posix.getpid()) has received SIGINT, ending..." ) _mainloop.quit() return Source.REMOVE For segmentation faults you may find inspiration from vala-stacktrace: https://github.com/PerfectCarl/vala-stacktrace Thanks for keeping us updated, Al ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala on OpenIndiana Updated
You would probably use Posix.signal () On August 16, 2017 11:57:48 AM EDT, Jason Martinwrote: >GLib.Math.pow10.vala >GLib.Math.pow10f.vala >These functions are missing on some platforms: > >Some of the core dumps are truly meant to be core dumps. > >Maybe a good vala example (someone more qualified than me) of trapping >signals would be handy? >___ >vala-list mailing list >vala-list@gnome.org >https://mail.gnome.org/mailman/listinfo/vala-list ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list
Re: [Vala] Vala on OpenIndiana Updated
GLib.Math.pow10.vala GLib.Math.pow10f.vala These functions are missing on some platforms: Some of the core dumps are truly meant to be core dumps. Maybe a good vala example (someone more qualified than me) of trapping signals would be handy? ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list
[Vala] Vala on OpenIndiana Updated
With help; got developer/vala (openindiana.org) 0.36.4-2017.0.0.2 into https://github.com/OpenIndiana/oi-userland 940 examples from https://github.com/valadoc/valadoc-org 62 examples from https://github.com/acmeism/RosettaCodeData 974 PASSED Skipped --pkg gee-1.0 and some more examples Still have not figured these two out: GLib.Math.pow10.vala GLib.Math.pow10f.vala Only 5 cores left - seems to be related to process abort assertions.vala GLib.error.vala GLib.Process.abort.vala GLib.Test.fail.vala GLib.Test.run.vala GLib.Test.trap_assert_passed.vala Fixed GLib.Array.prepend_vals.vala added string b = "3. entry"; changed array.prepend_val (b); The samples at https://valadoc.org/gmodule-2.0/GLib.Module.html worked after -X --shared was changed to -X -shared valac working great!!! ___ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list