Bugs item #3115854, was opened at 2010-11-22 21:25
Message generated for change (Comment added) made by megurikuru
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=611248&aid=3115854&group_id=95403

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: megurikuru  (megurikuru)
Assigned to: Nobody/Anonymous (nobody)
Summary: Cannot profile application with unmanaged SIGTERM

Initial Comment:
Virtual NetManager (VNM) works together with VDE. When VNM stops running 
sub-programs (wirefilter, vde_switch, etc) sends SIGTERM (15). Inside VDE 
elements, at present, the default action with SIGTERM is to do a cleanup() , 
reattach the default signal management and execute default management of 
SIGTERM, that is SIGKILL. When profiling programs compiled with -gp, a clean 
exit is needed to correctly write the profiling information file (gmon.out). 
That means the program has to do a return from the main or execute exit(int);
I've fixed this doing a "if(sig==SIGTERM) exit(0);" inside the sig_handler 
function of the various programs (vde_switch,wirefilter,etc), just before the 
"kill(getpid(), sig);" line.

----------------------------------------------------------------------

Comment By: megurikuru  (megurikuru)
Date: 2010-11-22 21:47

Message:
Errata corrige: the line "if(sig==SIGTERM) exit(0);" has to be inserted at
the head of sig_handler function to avoid double cleanup call [this is
because the use of atexit(cleanup); function in main].

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=611248&aid=3115854&group_id=95403

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
vde-users mailing list
vde-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vde-users

Reply via email to