Home Bug Reports

pthread_sigmask() on suse 9 amd64

garrygarry Member
i found that pthread_sigmask() on linux platforms doesn't set sigmask for threads created in that 'main' thread. probably calling sigprocmask() in CtrlCHandler constructor would be more correct, at least for linux.

Comments

  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    I tried on Fedora Core 2 (2.6.7 kernel): the behavior follows the standard, i.e. signal masks are properly "inherited". See 6.6.2 Signal masks in David Butenhof's "Programming with POSIX Threads".

    You'll find attached a modified version of $ICE_HOME/test/IceUtil/ctrlCHandle/Client.cpp: it will show you whether the CtrlCHandler blocks SIGHUP, SIGINT and SIGTERM for new threads or not.

    Maybe it's a bug in your kernel? How did you determine that pthread_sigmask is broken on your OS?

    Cheers,
    Bernard
Sign In or Register to comment.