Hi,
Say I have the following:
hsext_setup() { /* start Haskell run time system */ }
hsext_unsetup() { /* stop Haskell run time system cannot be restarted hereafter */ }
Am I correct in assuming hsext_setup() will be called at most once?
How can I ensure hsext_unsetup() is called when Pd exits?
Is atexit() the right way? Seems dirty:
---- $ man atexit
Since glibc 2.2.3, atexit() can be used within a shared library to establish functions that are called when the shared library is unloaded.
Functions registered using atexit() are not called if a process terminates abnormally because of the delivery of a signal. ----
Thanks for any ideas,
Claude
Hi Claude, hsext_setup is called only once, and the class definition stays in the system until PD exits. You shouldn't have to worry about ***_unsetup since the run time system will be "unloaded" anyhow when the PD process ends. If there are any needs to really close things, this should be done by haskell itself, when the respective shared libraries are unloaded.
greetings, Thomas
Am 07.01.2007 um 12:46 schrieb Claude Heiland-Allen:
Hi,
Say I have the following:
hsext_setup() { /* start Haskell run time system */ }
hsext_unsetup() { /* stop Haskell run time system cannot be restarted hereafter */ }
Am I correct in assuming hsext_setup() will be called at most once?
How can I ensure hsext_unsetup() is called when Pd exits?
Is atexit() the right way? Seems dirty:
$ man atexit
Since glibc 2.2.3, atexit() can be used within a shared library to establish functions that are called when the shared library is unloaded.
Functions registered using atexit() are not called if a process terminates abnormally because of the delivery of a signal.
Thanks for any ideas,
Claude
http://claudiusmaximus.goto10.org
PD-dev mailing list PD-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
Thomas Grill http://grrrr.org