sigrelse01.c: cleanup() should be called only once
PATCH 1/1 sigrelse01.c: cleanup() should be called only once
Hi Garrett,
cleanup() call the function tst_rmdir() to remove the temporary directory, so cleanup() should be called only once.
--- testcases/kernel/syscalls/sigrelse/sigrelse01.c | 11 +++-------- 1 files changed, 3 insertions(+), 8 deletions(-)
testcases/kernel/syscalls/sigrelse/sigrelse01.c +3 -8
@@ -373,9 +373,6 @@ static void parent()tst_resm (TBROK ,"Unexpected exit code %d from child" , rv);break ; } - -cleanup (); - }/* end of parent */ /****************************************************************************
@@ -797,8 +794,7 @@ void setup()/* set up pipe for parent/child communications */ if (pipe (pipe_fd) <0 ) { -tst_resm (TBROK |TERRNO ,"pipe() failed" ); -cleanup (); +tst_brkm (TBROK |TERRNO , cleanup,"pipe() failed" ); }/*
@@ -812,8 +808,7 @@ void setup()/* set up pipe for parent/child communications */ if (pipe (pipe_fd2) <0 ) { -tst_resm (TBROK |TERRNO ,"pipe() failed" ); -cleanup (); +tst_brkm (TBROK |TERRNO , cleanup,"pipe() failed" ); }/*
@@ -840,4 +835,4 @@ void cleanup()tst_rmdir (); -} +}
Signature · 17 lines
1.7.0.1 -- Best Regards, Peng Haitao ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 4 lines · Peng Haitao
Hi Garrett,
cleanup()call the functiontst_rmdir()to remove the temporary directory, socleanup()should be called only once.
I did some style cleanup, but I'm concerned that the signal
handler code setup might not function as expected because it used to build off of choose_sig. Please verify whether or not things work for you now.
Thanks,
-Garrett
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list