summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixNotfy.c
Commit message (Collapse)AuthorAgeFilesLines
* Tcl_InitNotifier: Bug [a0bc856dcd]. Start notifier thread again if we were ↵jan.nijtmans2013-08-011-1/+112
|\ | | | | | | forked, to solve Rivet bug 55153
| * Make sure that the notifierMutex and notifierCV in a forked child cannot ↵jan.nijtmans2013-07-251-0/+2
| | | | | | | | block anything, even though the initialization of the Notifier Thread in the parent is not finished yet.
| * Use pthread_atfork() when available.jan.nijtmans2013-07-221-1/+89
| |
| * Fix bug which hangs iocmd.tf-32.1jan.nijtmans2013-07-221-1/+1
| |
| * Rebase to core-8-5-branchjan.nijtmans2013-07-211-3/+24
| |\ | | | | | | Add "testfork" test command to be usable in testcase.
| | * Start notifier thread again if we were forked, to solve Rivet bug 55153 - ↵oehhar2013-07-171-0/+21
| |/ |/| | | | | RFE [a0bc856dcd]
| * Backport of 2008-12-12 8.6 commit: Fix missing CLOEXEC on internal pipes ↵ferrieux2012-09-071-0/+6
| | | | | | | | [2417695]
* | Fix compiler warning when compiling Cygwin port with -Wwrite-stringsjan.nijtmans2013-07-031-6/+6
| |
* | Minor changes to improve style (C89 declarations, consistent indentation,dkf2012-08-071-79/+96
| | | | | | | | clarification of #endifs, reduction of unnecessary casts, use of array syntax for reading array elements, etc.)
| |
| \
*-. \ merge 8.5dgp2012-07-101-2/+2
|\ \ \ | | |/
| | * [Bug 3541646] Don't panic on triggerPipe overrunjan.nijtmans2012-07-101-5/+5
| |/
* | [Bug 3508771]: Cygwin notifier for handling win32 eventsjan.nijtmans2012-06-231-2/+145
|\ \ | |/
| * [Bug 3508771]: Cygwin notifier for handling win32 eventsjan.nijtmans2012-06-231-1/+144
| |\
| | * [Bug 3508771]: Cygwin notifier for handling win32 eventsjan.nijtmans2012-06-231-1/+144
| | |\
| | | * first working version of Cygwin notifierbug_3508771jan.nijtmans2012-06-221-6/+28
| | | |\ | | | |/ | | |/|
| | | * first attempt at Cygwin notifier adaptationjan.nijtmans2012-06-131-0/+119
| | |/
* | | Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-3/+3
| | | | | | | | | rest of Tcl source code. No ABI change. API change *should* be harmless.
* | | fix broken builddgp2011-03-101-1/+1
| | |
* | | MINOR: Formatting fixes, mainly to comments, so code better fits the style indkf2011-03-101-63/+72
| | | | | | | | | the Engineering Manual.
* | | Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
|\ \ \ | |/ / | | | cause more harm than good. Purged them (except in zlib files).
| * | Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
| |\ \ | | |/ | | | more harm than good. Purged them.
| | * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | | | | | | | | more harm than good. Purged them.
| | * * unix/tclUnixNotfy.c (Tcl_WaitForEvent): Fixed broken if syntaxandreas_kupries2006-08-221-2/+2
| | | | | | | | | | | | | | | | | | committed 2006-08-21 by Daniel. The broken syntax is visible to all unix platforms, but not on OSX for machines which HAVE_COREFOUNDATION.
| | * * macosx/tclMacOSXNotify.c (Tcl_WaitForEvent): if the run loop isdas2006-08-211-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | already running (e.g. if Tcl_WaitForEvent was called recursively), re-run it in a custom run loop mode containing only the source for the notifier thread, otherwise wakeups from other sources added to the common run loop modes might get lost; sync panic msg changes from HEAD. * unix/tclUnixNotfy.c (Tcl_WaitForEvent): on 64-bit Darwin, pthread_cond_timedwait() appears to have a bug that causes it to wait forever when passed an absolute time which has already been exceeded by the system time; as a workaround, when given a very brief timeout, just do a poll on that platform. [Bug 1457797]
| | * * unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),das2005-11-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add CFLAGS to SHLIB_LD to support passing -isysroot in env(CFLAGS) to configure (flag can't be present twice, so can't be in both CFLAGS and LDFLAGS during configure), don't use -prebind when deploying on 10.4, define TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING (rdar://3171542). (SC_ENABLE_LANGINFO, SC_TIME_HANDLER): add/fix caching, fix obsolete autoconf macros. Sync with tk/unix/tcl.m4, sync whitespace with HEAD. * unix/configure.in: fix obsolete autoconf macros, sync gratuitous formatting/ordering differences with tk/unix/configure.in. * unix/Makefile.in: add CFLAGS to tclsh/tcltest link to make executable linking the same as during configure (needed to avoid loosing any linker relevant flags in CFLAGS, in particular flags that can't be in LDFLAGS). Avoid concurrent linking of tclsh and compiling of tclTestInit.o or xtTestInit.o during parallel make. (checkstubs, checkdoc, checkexports): dependency and Darwin fixes * unix/tclLoadDyld.c (TclpDlopen): use NSADDIMAGE_OPTION_WITH_SEARCHING on second NSAddImage only. [Bug 1204237] (TclGuessPackageName): should not be MODULE_SCOPE. (TclpLoadMemory): ppc64 and endian (i386) fixes, add support for loading universal (fat) bundles from memory. * unix/tclUnixPort.h: * unix/tclUnixFCmd.c: add support for new Tiger copyfile() API to enable copying of xattrs & ACLs by [file copy]. * generic/tcl.h: add Darwin specifc configure overrides for TCL_WIDE defines to support fat compiles of ppc and ppc64 at the same time, (replaces Darwin CVS fix by emoy, rdar://3693001). add/correct location of version numbers in macosx files. * generic/tclInt.h: clarify fat compile comment. * unix/tclUnixPort.h: add Darwin specifc configure overrides to support fat compiles, where configure runs only once for multiple architectures (replaces Darwin CVS fix by emoy, rdar://3693001). * macosx/tclMacOSXBundle.c: * macosx/tclMacOSXNotify.c: * unix/tclUnixNotfy.c: * unix/tclUnixPort.h: fix #include order to support compile time override of HAVE_COREFOUNDATION in tclUnixPort.h when building for ppc64 * macosx/Tcl.pbproj/default.pbxuser (new file): * macosx/Tcl.pbproj/jingham.pbxuser: * macosx/Tcl.pbproj/project.pbxproj: sync with HEAD. * macosx/README: clarification/cleanup, sync with HEAD, document universal (fat) builds via CFLAGS (i.e. all of ppc ppc64 i386 at once). * macosx/Makefile: add support for reusing configure cache, build target fixes, remove GENERIC_FLAGS override now handled by tcl.m4. * generic/tclIOUtil.c: * generic/tclRegexp.c: * generic/tclVar.c: declare globals used only in own file as static (sync with HEAD). * generic/rege_dfa.c (getvacant): * generic/regexec.c (cfind): * generic/tclCompExpr.c (CompileSubExpr): * unix/tclUnixChan.c (TclUnixWaitForFile): initialise variables to silence gcc 4 warnings. * generic/regguts.h: only #define NDEBUG if not already #defined. * macosx/tclMacOSXNotify.c: sync whitespace & comments with HEAD * unix/configure: regen.
| | * Protect against spurious wake-ups while waiting on the condition variablevasiljevic2005-07-011-6/+8
| | | | | | | | | | | | when tearing down the notifier thread [Bug# 1222872].
| | * Backport unix threading fixdkf2005-06-071-3/+3
| | |
| | * Cosmetic change (fixed identation in Tcl_FinalizeNotifier)vasiljevic2005-05-311-4/+4
| | |
| | * Notifier thread is created as joinable. Attempt to solve thevasiljevic2005-05-311-3/+8
| | | | | | | | | | | | Tcl Bug #1082283.
| | * * macosx/tclMacOSXBundle.c:das2005-05-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * unix/tclUnixInit.c: * unix/tcl.m4 (Darwin): made use of CoreFoundation API configurable and added test of CoreFoundation availablility to allow building on ppc64, replaced HAVE_CFBUNDLE by HAVE_COREFOUNDATION; test for availability of Tiger or later OSSpinLockLock API. * unix/tclUnixNotfy.c: * unix/Makefile.in: * macosx/tclMacOSXNotify.c (new file): when CoreFoundation is available, use new CFRunLoop based notifier: allows easy integration with other event loops on Mac OS X, in particular the TkAqua Carbon event loop is now integrated via a standard tcl event source (instead of TkAqua upon loading having to finalize the exsting notifier and replace it with its custom version). [Patch 1202052] * tests/unixNotfy.test: don't run unthreaded tests on Darwin since notifier may be using threads even in unthreaded core. * unix/tclUnixPort.h: * unix/tcl.m4 (Darwin): test for thread-unsafe realpath durning configure, as Darwin 7 and later realpath is threadsafe. * macosx/tclMacOSXBundle.c: * unix/tclLoadDyld.c: * unix/tclUnixInit.c: fixed gcc 4.0 warnings. * unix/configure: autoconf-2.13
| | * * compat/string.h: fixed memchr() protoype for __APPLE__ so that wedas2005-04-261-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | build on Mac OS X 10.1 again. * generic/tclNotify.c (TclFinalizeNotifier): fixed notifier not being finalized in unthreaded core (was testing for notifier initialization in current thread by checking thread id != 0 but thread id is always 0 in untreaded core). * unix/tclUnixNotfy.c (Tcl_WaitForEvent): sync with HEAD: only declare and use timeout var in unthreaded core. * unix/Makefile.in: added @PLAT_SRCS@ to SRCS and split out NOTIFY_SRCS from UNIX_SRCS for parity with UNIX_OBJS & NOTIFY_OBJS. * unix/configure.in: only run check for broken strstr implementation if AC_REPLACE_FUNCS(strstr) hasn't already determined that strstr is unavailable, otherwise compat/strstr.o will be used twice (resulting in duplicate symbol link errors on Mac OS X 10.1) * unix/tcl.m4 (Darwin): added configure checks for recently added linker flags -single_module and -search_paths_first to allow building with older tools (and on Mac OS X 10.1), use -single_module in SHLIB_LD and not just T{CL,K}_SHLIB_LD_EXTRAS, added unexporting from Tk of symbols from libtclstub to avoid duplicate symbol warnings, added PLAT_SRCS definition for Mac OS X. (SC_MISSING_POSIX_HEADERS): added caching of dirent.h check. (SC_TCL_64BIT_FLAGS): fixed 'checking for off64_t' message output. * unix/configure: autoconf-2.13
| | * * unix/tclUnixNotfy.c (NotifierThreadProc): init numFdBitscore_8_4_9hobbs2004-12-071-5/+5
| | | | | | | | | | | | [Bug 1079286]
| | * took out redundant memcpy from tclUnixNotfy.cKevin B Kenny2004-11-241-3/+1
| | |
| | * * unix/tcl.m4 (SC_ENABLE_THREADS): Corrected bad check forKevin B Kenny2004-11-241-82/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | 3-argument readdir_r [Bug 1001325]. * unix/configure: Regenerated. * unix/tclUnixNotfy.c: Corrected all uses of 'select' to manage their masks using the FD_CLR, FD_ISSET, FD_SET, and FD_ZERO macros rather than bit-whacking that failed under Solaris-Sparc-64. [Bug 1071807]
| | * * unix/tclUnixNotfy.c (NotifierThreadProc): Accepted Joeandreas_kupries2004-07-161-1/+3
| | | | | | | | | | | | | | | Mistachkin's patch for [Tcl SF Bug 990500], properly closing the notifier thread when its exits.
| | * Corrected Tcl Bug #770053vasiljevic2004-06-221-2/+2
| | |
| | * * unix/tclUnixNotfy.c (NotifierThreadProc): correct size of foundhobbs2003-07-161-2/+3
| | | | | | | | | | | | and word vars from int to long. [Bug 767578] (hgo)
| | * * generic/tclInt.h (tclOriginalNotifier):dgp2003-03-211-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclStubInit.c (tclOriginalNotifier): * mac/tclMacNotify.c (Tcl_SetTimer,Tcl_WaitForEvent): * unix/tclUnixNotfy.c (Tcl_SetTimer,Tcl_WaitForEvent, Tcl_CreateFileHandler,Tcl_DeleteFileHandler): * win/tclWinNotify.c (Tcl_SetTimer,Tcl_WaitForEvent): Some linkers apparently use a different representation for a pointer to a function within the same compilation unit and a pointer to a function in a different compilation unit. This causes checks like those in the original notifier procedures to fall into infinite loops. The fix is to store pointers to the original notifier procedures in a struct defined in the same compilation unit as the stubs tables, and compare against those values. [Bug 707174]
| * | Use correct TCL_LL_MODIFIER for CYGWIN.nijtmans2010-01-291-4/+10
| | | | | | | | | | | | | | | Formatting (all backported from HEAD) Fix gcc 4.4 warning: ignoring return value of ‘write’,
| * | * macosx/tclMacOSXNotify.c: revise CoreFoundation notifier to allowdas2009-04-101-30/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * unix/tclUnixChan.c: embedding into applications that * unix/tclUnixEvent.c: already have a CFRunLoop running and want to run the tcl event loop via Tcl_ServiceModeHook(TCL_SERVICE_ALL). * macosx/tclMacOSXNotify.c: add CFRunLoop based Tcl_Sleep() and * unix/tclUnixChan.c: TclUnixWaitForFile() implementations * unix/tclUnixEvent.c: and disable select() based ones in CoreFoundation builds. * unix/tclUnixNotify.c: simplify, sync with tclMacOSXNotify.c. * generic/tclInt.decls: add TclMacOSXNotifierAddRunLoopMode() * generic/tclIntPlatDecls.h: internal API, regen. * generic/tclStubInit.c:
* | | Eliminate various unnecessary type casts, use function typedefs whenever ↵nijtmans2010-06-211-5/+6
| | | | | | | | | | | | possible
* | | Fix gcc warning: ignoring return value of ‘write’,nijtmans2009-12-171-3/+3
| | | | | | | | | | | | declared with attribute warn_unused_result
* | | Fix gcc warning: ignoring return value of ‘write’,nijtmans2009-12-161-4/+10
| | | | | | | | | | | | | | | | | | declared with attribute warn_unused_result CONSTify functions TclpGetUserHome and TclSetPreInitScript (TIP #27)
* | | * macosx/tclMacOSXNotify.c: revise CoreFoundation notifier to allowdas2009-04-101-29/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * unix/tclUnixChan.c: embedding into applications that * unix/tclUnixEvent.c: already have a CFRunLoop running and want to run the tcl event loop via Tcl_ServiceModeHook(TCL_SERVICE_ALL). * macosx/tclMacOSXNotify.c: add CFRunLoop based Tcl_Sleep() and * unix/tclUnixChan.c: TclUnixWaitForFile() implementations * unix/tclUnixEvent.c: and disable select() based ones in CoreFoundation builds. * unix/tclUnixNotify.c: simplify, sync with tclMacOSXNotify.c. * generic/tclInt.decls: add TclMacOSXNotifierAddRunLoopMode() * generic/tclIntPlatDecls.h: internal API, regen. * generic/tclStubInit.c:
* | | Fix missing CLOEXEC on internal pipes [2417695] and [chan pipe] fds.ferrieux2008-12-121-1/+7
| | |
* | | Style improvements - invoking callbacks without visual junk.dkf2008-10-261-3/+3
| | |
* | | CONSTified 4 functions in the Notifier which all have a Tcl_Time* in it which isnijtmans2008-07-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | supposed to be a constant, but this was not reflected in the API: Tcl_SetTimer Tcl_WaitForEvent Tcl_ConditionWait Tcl_SetMaxBlockTime Introduced a CONST86, so extensions which have their own Notifier (are there any?) can be modified to compile against both Tcl 8.5 and Tcl 8.6. This change complies with TIP #24
* | | * generic/tclInt.h: revise Tcl_SetNotifier() to use adas2008-04-161-333/+346
|/ / | | | | | | | | | | | | | | * generic/tclNotify.c: module-scope hooks table instead of * generic/tclStubInit.c: runtime stubs-table modification; * macosx/tclMacOSXNotify.c: ensure all hookable notifier functions * win/tclWinNotify.c: check for hooks; remove hook checks in * unix/tclUnixNotfy.c: notifier API callers. [Patch 1938497]
* | * unix/tclUnixNotfy.c: fix warningdas2008-03-111-2/+2
| |
* | Consolidate all code conditionalized on -DUSE_FIONBIO into one place.jenglish2008-02-281-16/+3
| | | | | | | | New routine TclUnixSetBlockingMode().