Commit Graph

69 Commits

Author SHA1 Message Date
Pieter Hintjens
8620c3e032 Problem: source file headers are somewhat confusing about LGPLv3
Of course people still "can" distributed the sources under the
LGPLv3. However we provide COPYING.LESSER with additional grants.

Solution: specify these grants in the header of each source file.
2015-06-02 22:33:55 +02:00
Pieter Hintjens
594e3dcceb Problem: shutdown asserts if WSASTARUP wasn't done previously
This is a silly assertion that causes problems if libzmq.dll is
called in some esoteric ways.

Solution: if the shutdown code detects WSANOTINITIALISED, then
exit silently.

Fixes #1377
Fixes #1144
2015-04-20 12:53:37 +02:00
Pieter Hintjens
94d9a4ffdf Problem: copyright statements are out of date
Solution: update for 2015

Fixes #1320
2015-01-22 10:32:37 +01:00
Michaël Paul
7c5906d138 Problem : Build failed with MinGW on windows 2014-09-24 15:46:43 +02:00
Ewen McNeill
0af693c496 z/OS: Loop on EAGAIN on close() in ~signaler
Updated:
    src/signaler.cpp: Add close_wait_ms() static function to loop
       when receiving EAGAIN in response to close(), with ms long
       sleeps, up to a maximum limit (default 2000ms == 2 seconds);
       used in signaler_t::~signaler_t() destructor.
2014-07-23 14:01:43 +12:00
Martin Hurton
816299f11c Code cleanup 2014-07-09 14:07:32 +02:00
Richard Newton
bbaa85e7dd Fix windows non-unicode build 2014-04-27 13:29:20 +01:00
evoskuil
ca29709f38 Change TCHAR to Unicode, use safe swprintf to remove warning. 2014-04-25 00:43:47 -07:00
evoskuil
86ef40d171 Reorganize and clean up visual studio build configurations. 2014-03-29 23:13:00 -07:00
Frank
8edc80f27b cmake: fix fragile code related to HAVE_FORK macro
* report from Richard Newton indicated previous solutions was not
  working on Windows
2014-03-18 21:07:45 +01:00
Olaf Mandel
48b50cefb4 Remove duplicate poller decision making
The decision about the poller mechanism to use (select, poll, ...)
was done twice: once by the build system and once by the code in
poller.hpp. As the build-system can actually detect the mechanisms
available, prefer that result to the hard coded defaults in
poller.hpp.

At the same time, remove the duplicate detection of select() vs.
poll()-variant from proxy.cpp, signaler.cpp and zmq.cpp.

This patch has not been tested on many build platforms: especially
the cmake build needs testing / patching. For the other builds,
hard code the result as these these are all Windows platforms.
2014-02-17 14:08:11 +01:00
Pieter Hintjens
b3b9e046ee Updated copyright statements for 2014 2014-01-02 12:00:57 +01:00
KIU Shueng Chuan
7f22995e35 use mutex implementation if fixed signaler_port!=5905 2013-12-12 00:39:01 +08:00
KIU Shueng Chuan
bd41087ab9 make win32 signaler support ephemeral ports 2013-11-28 18:25:28 +08:00
KIU Shueng Chuan
7bd0b6ada1 remove all asserts during critical section
the size of the critical section is reduced by only entering the critical
section right before the bind().
2013-11-12 01:12:24 +08:00
KIU Shueng Chuan
cf8ba925b4 return error to caller on bind error 2013-11-12 00:07:06 +08:00
Bruno D. Rodrigues
750426037d Fix socket creation above sistem limits for all 'other' OS not covered by eventfd, windows or vms; enhanced test to create sockets up to a bigger limit to really test hitting the OS limit 2013-11-10 10:19:19 +00:00
Pieter Hintjens
51f8571933 Simplified fdpair reset after fork 2013-11-07 15:30:25 +01:00
Pieter Hintjens
2be70dca1a Simplified error handling for make_fdpair on Windows 2013-11-07 15:26:56 +01:00
Pieter Hintjens
c573f6b812 Fix for issue 574 2013-11-07 14:59:53 +01:00
Matt Connolly
c3adc86d6b Fix unused variable when using eventfd 2013-09-02 06:49:30 +10:00
Matt Connolly
ff2900fd52 Terminate context in a child process of fork() to replace file descriptors to not interfere with parent process's context 2013-09-01 20:42:15 +10:00
Pieter Hintjens
f0f16505e5 Removed corporate advertisements from source file headers
Copyrights had become ads for Sustrik's corporate sponsors, going against the original
agreement to share copyrights with the community (that agreement was: one line stating
iMatix copyright + one reference to AUTHORS file). The proliferation of corporate ads
is also unfair to the many individual authors. I've removed ALL corporate title from
the source files so the copyright statements can now be centralized in AUTHORS and
source files can be properly updated on an annual basis.
2013-03-12 13:24:57 +01:00
Sébastien Rombauts
57f84d6811 Windows CE support : some more #if !defined _WIN32_WCE
- Windows CE does not manage security attributes (no SetSecurityDescriptorDacl(), SetEvent (NULL, xxx) ...)
- Windows CE does not inheritance of sockets for child process (SetHandleInformation ((HANDLE) *w_, HANDLE_FLAG_INHERIT...)
- see comments about story "Porting ZeroMQ to Windows Mobile" on webpage http://www.zeromq.org/story:5
2013-02-19 18:57:12 +01:00
KIU Shueng Chuan
8c71ac47e8 release critical section on failure to create signaler fdpair 2013-02-15 10:45:43 +08:00
Pieter Hintjens
949d157897 Merge pull request #492 from arsenm/master
Make CMake build usable for other systems
2013-01-02 00:32:15 -08:00
Matt Arsenault
f770954d30 Fix a couple more warnings 2013-01-02 03:24:11 -05:00
Matt Arsenault
6ecb796e77 Fix warnings with MinGW 2013-01-02 03:24:11 -05:00
KIU Shueng Chuan
151a80619b set SO_LINGER on first signaler socket to close in order to avoid
TIME_WAIT state.
2012-12-29 18:05:15 +08:00
KIU Shueng Chuan
942c654d1c win32: close zmq-signaler-port-sync event object to avoid handle leak 2012-12-27 21:31:12 +08:00
Pieter Hintjens
4ba34c9d70 Whitespace and style fixes 2012-10-24 09:18:52 +09:00
Matthew Metnetsky
a0eb0bb7e6 signaler.cpp's Windows Lock should be in the "Global" namespace
That way it can be used more appropriately between processes.
2012-07-26 13:55:27 -04:00
Matthew Metnetsky
83537916f8 Fix issue 335
By assigning a SECURITY_DESCRIPTOR to the event we gain the ability to
share it between service and console programs. We also added
EVENT_MODIFY_STATE as a requirement to OpenEvent so we can SetEvent later
in the method.
2012-07-26 13:52:38 -04:00
Ian Barber
eb14890d23 Revert "Revert "Merge branch 'master' of github.com:ianbarber/libzmq""
This reverts commit 029d3dfae2.
2012-06-12 14:43:18 +01:00
Ian Barber
029d3dfae2 Revert "Merge branch 'master' of github.com:ianbarber/libzmq"
This reverts commit 3345902979, reversing
changes made to 889b0e6f29.
2012-06-12 14:13:17 +01:00
Martin Hurton
1f53697211 Use struct keyword consistently with sockaddr and sockaddr_in 2012-06-10 02:29:49 +02:00
Martin Hurton
24b79c7e0b Prefer errno_assert/alloc_assert to zmq_assert 2012-05-28 23:17:03 +02:00
unknown
5fe6ddfda3 On Windows, preventing sockets to be inherited by child processes. 2012-05-07 15:46:55 +02:00
Martin Hurton
cfa6f4bf51 Fix issue #335
The CreateEvent function requests EVENT_ALL_ACCESS access rights
when the event object already exists. This causes problems
when the event object is created from a service.
The solution is to call OpenEvent function when the CreateEvent
failed due to access control.
The proper solution would be to use CreateEventEx function, but
this one is not available on Windows XP.
2012-04-11 11:41:10 +02:00
boris@boressoft.ru
318ba8836f Add WinCE support.
* Added two new files: errno.hpp and errno.cpp. They are required to use errno functionality on WM.
* zmq.cpp, msg.h: removed inclusion of errno.h because it is included in zmq.h that is also included by .cpp.
* windows.hpp: process.h is included only for desktop builds.
* thread.cpp: on CE CreateThread is used instead of __beginthreadex
* socket_base.cpp, clock.cpp: on CE include cmnintrin.h instead on intrin.h
* signaler.cpp: on Windows should use special macro around event name (for unicode builds)
* err.hpp: make it include errno.hpp (my file) instead on errno.h when building for CE
* err.cpp: use FormatMessage when building for CE (because CE does not have ANSI API functions)
* zmq.h: do not include errno.h whe building for CE
* libzmq.vcproj: add tro new files
2012-03-14 19:12:28 +04:00
Martin Sustrik
f8b0055026 Hangup in signaler creation on Windows fixed
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-10 23:38:08 +01:00
Martin Sustrik
05ce301f35 Merge branch 'master' of github.com:zeromq/libzmq 2011-11-04 09:48:25 +01:00
Martin Sustrik
8e21d64c97 Copyright dates adjusted to reflect reality
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-11-01 18:06:11 +01:00
Martin Sustrik
ac7717b7b3 250bpm copyrights added
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-10-31 16:20:30 +01:00
Martin Sustrik
81da391e7e Use single port for creating signalers on Windows
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-09-29 14:47:41 +02:00
Martin Sustrik
8b7ac4c2a9 Close file descriptors on exec (issue 218)
When exec is executed to start a different process image old
0MQ file descriptors could stay open, thus blocking TCP ports
and alike. This patch should solve the problem.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-09-02 15:34:12 +02:00
Martin Sustrik
d5f3628ad0 Different connecters simplified
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-29 09:37:43 +02:00
Steven McCoy
18d8be5e92 Fix pollin on Cygwin.
Signed-off-by: Steven McCoy <steven.mccoy@miru.hk>
Signed-off-by: Martin Sustrik <sustrik@250bom.com>
2011-07-18 10:54:53 +02:00
Martin Sustrik
f97f50c252 Signaler timeout bug on Windows fixed
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
2011-07-18 09:41:26 +02:00
Martin Sustrik
8fb9d3c6d0 Merge branch 'master' of github.com:zeromq/libzmq 2011-07-03 15:33:25 +02:00