Hi Nicholas, One way to achieve this would be to use atexit() function. In DMTCP_EVENT_INIT, you can register a function to be called at the time of exit. This would capture exit() as well as return from main(). Does that work?
Kapil On Sun, Mar 16, 2014 at 11:42 AM, Nicolas De Voecht <[email protected]> wrote: > Hi team, > > I would like to be notified when a program running under DMTCP ended. I > wrote a small plugin that try to send an email when an event > DMTCP_EVENT_EXIT occurs but it does not seem to work. > > With a simple example program like: > > int main(int argc, char** argv){ > printf("Hello word!\n"); > } > > the event DMTCP_EVENT_EXIT does not occur. It only occurs when I add the > exit instruction: > > int main(int argc, char** argv){ > printf("Hello word!\n"); > exit(0); > } > > Is there another way to go ? > > Thanks in advance for your help :) > > Best regards, > > Nicolas De Voecht > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > Dmtcp-forum mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/dmtcp-forum > ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Dmtcp-forum mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dmtcp-forum
