Re: Automatic Refresh for local Maildir's mail cou nts?
Sam Varshavchik <[email protected]> Sat, 31 Dec 2016 12:27:38 -0500
| Newsgroups | gmane.mail.cone |
|---|---|
| Message-ID | <[email protected]> |
This is a MIME GnuPG-signed message. If you see this text, it means that your E-mail or Usenet software does not support MIME signed messages. The Internet standard for MIME PGP messages, RFC 2015, was published in 1996. To open this message correctly you will need to install E-mail or Usenet software that supports modern Internet standards. --===============8025230261844022420== Content-Type: multipart/signed; boundary="=_monster.email-scan.com-4958-1483205258-0001"; micalg=pgp-sha1; protocol="application/pgp-signature" This is a MIME GnuPG-signed message. If you see this text, it means that your E-mail or Usenet software does not support MIME signed messages. The Internet standard for MIME PGP messages, RFC 2015, was published in 1996. To open this message correctly you will need to install E-mail or Usenet software that supports modern Internet standards. --=_monster.email-scan.com-4958-1483205258-0001 Content-Type: text/plain; format=flowed; delsp=yes; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 7bit Linux-Fan writes: > > If you do not have a folder open, but looking at the folder > > hierarchy, the message counts are not going to get updated in > > realtime. There's no facility to do that. > > Ah OK, that's it: I misunderstood the meaning of ``open'' thinking it > was enough to view the folder hierarchy instead of looking at the actual > folder contents. The updates for the folder currently opened in a sense > that the contents are displayed work well (see above). > > Is it possible/planned to add a means of updating the message counts > from the folder hierarchy view automatically as well (similar to what > I did upon receiving a SIGUSR1 for my proof-of-concept patch from the > previous mail)? I'm open to such a feature; however this approach won't work. Signals are asynchronous, and none of the high levels function that the handler invokes are async-safe. If cone is doing nothing but polling for the next event, it'll work fine. If cone is in the middle of something, there's a high likelyhood of a crash. And if cone is not displaying the folder hierarchy, this is pretty much a guaranteed crash. The only safe way to do this: in addition to installing a signal handler, an internal pipe needs to be created, and put into nonblocking mode. The only thing the signal handler does is write a byte to the pipe, ignoring the results, and immediately terminating. Then, on the folder screen only, in addition to handling all the regular events the read end of the pipe gets polled as well, and when something is read, what your patch does would happen. Even with that, things may not work 100%. All the code needs to be audited and verified that it'll correctly handle an interrupted system call. Correct signal handling is hard. --=_monster.email-scan.com-4958-1483205258-0001 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJYZ+qKAAoJEGs6Yr4nnb8l+vUQAMQzFL5nIHwGFPVVbpR90d+i oxTY5oseks8U6m1u81NjzMSXEbU6d7AseCHxDKiK4Sxbm7oEvNQSP82Su55X0Pa4 TfVt4quppp/OMq8gul0dGjsOxSHtpJwQHjHtNTUpEu3D4MnFvAqQw5K+kf/+kEyz K1/YU/P0yG4OyF+8YlQxHW/DA4SRsQfBghIw1N6NZQc1UpzeIOyn51gs4Dj2WuYb HYpA4tq7mCEWSJQo9GGowGM0cVV5Ihd/MiexUnNJq4LLEcvLy+wg1tGXpbg+hVdr 3HKm1Tzrq7lOYFKBISFigmNgG08Wn9bz0bPx46fnOn1+B6HpzeqrCwZZgkMbFZtt 1TEqEAVl2lSnXrfDBXWGx4gduuQf9s4oNh/Tb0wUduK/+ZZulaoLwLrZ7Z/nLlUg etgC2kb/HzOX5m0QG5AaLqUu+vRzIIRPYTdYuuou5Zqz0Zpe9p4AD7feJUXYQlY0 KHRJpahBgtbrym0xzKNzqNk/EaHF06vtqgDJCAm95bqs0o9wbF5MPTb3tOeF8kWm bCbG/L7eHgEzv4Lm3h6kFZCF+dsU2RjHp5EbVhrHYyA/kNUiJlD67x8Nh5acUdC7 gmpSal+VK1WQBOTqWrIU7HafjZJ8eCk7iw30pzxhHFqXUcXGrJV4K+XsSrpNn7vT Fiy3KeeHKVlonEpUBrk3 =QdZt -----END PGP SIGNATURE----- --=_monster.email-scan.com-4958-1483205258-0001-- --===============8025230261844022420== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot --===============8025230261844022420== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Courier-cone mailing list [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-cone --===============8025230261844022420==--