Hi! > v1->v2: > v1:use the sigset for twice times. > v2:not use sigset for twice, but just check the SIG_ERR. > > According to the posix IEEE Std 1003.1-2008:Upon successful completion, > sigset() shall return SIG_HOLD if the signal had been blocked and the > signal's previous disposition if it had not been blocked. > > In these two test instances, the first time when sigset() is called, it > then calls the __sigprocmask() to mask the signal to SIG_BLOCK and checks > the old set to see if the signal was blocked previously, and it's not. > So it will not return SIG_HOLD, but the sigset() already runs successfully. > > Then, after the first time we calls the sigset, the signal has already be > blocked, and now, calls the sigset() second, it will return SIG_HOLD, since > the signal had been blocked when we called the sigset() first time. > > We are now checking the return value of the first time calling. So, if > it fails, it'll return SIG_ERR instead. Just need to check the SIG_ERR. > > Signed-off-by: Wanlong Gao <[email protected]>
Applied a little different patch for sigset/7-1.c (but added your Signed-of-by so you have credit for the work too). I'll apply the part for sigset/6-1.c. Thanks. -- Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
