Date: Tue, 26 Apr 2016 22:27:11 +0300 From: abi <abi@abinet.ru> To: ports@freebsd.org Subject: Making a port part II : bind: Who ate a byte ? Message-ID: <571FC10F.2010406@abinet.ru>
next in thread | raw e-mail | index | archive | help
Hello, I'm porting ZoneMinder and making pull requests to avoid FreeBSD specific patches as upstream is happy to merge them. I've noticed that sock files ZM creates has 'soc' extension. This make these file haunt sock folder as they are not cleared for obvious reason after they are not needed. The code, that produces such effect is here: https://github.com/ZoneMinder/ZoneMinder/blob/247cb3d0b2adb8941bd1cd400cf783bdfc71832d/src/zm_stream.cpp#L326 If I increment buffer to 1 (strlen() + sizeof() + 1) created files have correct endings. I can just add +1 if platform is FreeBSD and send this to upstream, however, being not a programmer, I can't tell why it's happening. The code looks generic enough to work on any posix system. How can we lost the byte here? Maybe there is a more proper solution, without #if ?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?571FC10F.2010406>