Age | Commit message (Collapse) | Author | Files | Lines |
|
Need strings.h for strcasecmp
(Although I don't really think it's necessary to support lower case
versions of signal names. This will probably change).
Fixes #270
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
To break vwait if a handled signal is received.
In this case, the handled signal(s) can be returned by signal check ?-clear?
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
jim.h now includes JIM_ABI_VERSION that should be incremented whenever
the ABI changes. Then all loadable modules should call Jim_CheckAbiVersion()
to make sure they are loaded against the correct version.
Add Jim_PackageProvideCheck() that does both Jim_CheckAbiVersion()
and Jim_PackageProvide() to simplify the implementation of loadable extensions.
Also rename the "big" sqlite3 extension to just sqlite to avoid a naming conflict with
the smaller jim-sqlite3 extension.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
If the signal is invalid, indicate that
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This allows a signal to be blocked by setting it's handler to SIG_IGN
Can be used to block SIGPIPE for exec
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
- fix popen [open "|pipeline ..."] to return meaningful status in close
(but note that stderr is not captured)
- popen pipelines can now be used as the target of exec redirection
- overally improvements to exec on windows. Now crt file descriptors
are used throughout
- add support for [pid], [wait] and popen on windows
- os.wait is now wait, and integrates with [exec ... &] to be able
to wait for running background tasks
- [socket pipe] is now also [pipe] and is supported on windows
- [file tempfile] is supported on windows
- move duplicated code between jim-aio.c and jim-exec.c to jimiocompat.c
- Fix [exec] on windows to match unix semantics wrt sharing the parent stream
unless redirected rather than using /dev/null
- On windows redirect to or from /dev/null is automatically converted to NUL:
- If signal support is disabled, implement a minimal Jim_SignalId() for exec and wait
- aio now supports getfd, to return the underlying file descriptor.
This is used by exec to support redirection, and allows popen channels
to support exec redirection.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
If the interpreter or signal command is deleted, restore
default signal handling and free allocated memory.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Currently signals can only be delivered to a single interpreter.
To avoid confusion where currently this is the most recently created
interpreter, don't create the signal command and handle signals in child interpreters.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
|
|
If NSIG is defined, limit the number of supported signals to that number
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Just use memset to initialise the sigaction
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
e.g. sleep 1.5
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Simplifies the process of building loadable extensions
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
For better compatibility c89 compatibility.
Also simplify jim-subcmd. Remove -usage and command descriptions.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Don't use -Werror
Prefer user CFLAGS over default options
Haiku needs -lnetwork for networking functions
Haiku does not have -lm
Haiku does not have SIGIO
Silence some warnings
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
It is very common to get the string value
without the length. Jim_String() is a macro which does that.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Instead of unsigned. Add UCHAR() macro for this.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Ensure that no public headers include the autoconf
header, jimautoconf.h, as it leads to problems
with redefined symbols.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Especially for eCos, mingw32 and cygwin
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
All C extensions must call Jim_PackageProvide()
make-c-ext ensures that Tcl extensions call Jim_PackageProvide()
if compiled in.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This allows the return code from a failed 'exec' command to be retrieved.
Also support -errorcode in catch and return.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Use 'indent'. Not perfect, but at least consistent.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Improve the ability to rethrow errors
* Allow return to rethrow an error by accepting '-errorinfo stacktrace'
* Also, 'catch ... opts' now also stores opts(-errorinfo) on error
* Use these to provide better stack traces from 'case' and 'try'
* Implement 'return -level'
Make try/on/finally more Tcl 8.6 compatible
* With support for 'on' handlers and docs
Add support for catch options to try
* Otherwise it's hard to use try to catch signals
Improvements to signal handling
* catch -signal now sets a list of the handled signals as the result
* catch -signal won't execute the body at all if a handled signal is pending
* up to 64 (jim_wide) signals can now be handled
* if catch -signal is nested, the innermost catch will catch the error
* new 'signal catch' allows ignored/blocked signals to be examined and cleared.
* update docs on signal handling
exec should indicate which signal killed the child
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Add lsearch -command, update case to use lsearch
Rename tcl6.tcl to tclcompat.tcl
Remove // style comments
Expand some tabs to spaces
Fix some compiler warnings
Remove some unused functions
Don't close fd=-1 in exec
|
|
Remove unimplemented 'after restart|expire' from eventloop
Allow libjim to be build as a shared library
On some platforms, regex.h needs stdlib.h first
Use ualarm() only for times < 1 second
Fix warnings found by clang static analyser
*: printf/syslog %m isn't portable
*: some variables set but never read
*: some possible null pointer references (although mostly impossible)
*: also minor fixes to jim unit tests
Fix 'syslog -options <n>'
Must null terminate readlink() result
|
|
jim
---
Add a unique id facility to jim (Jim_GetId())
Remove unused jim_vasprintf(), Jim_AppendString_sprintf()
Remove duplicate output in Jim_Panic()
Add support for catch -signal
aio
---
Use this for aio handles
aio automatically creates stdin, stdout and stderr channels
Jim_AioFilehandle() returns the 'FILE *' filehandle for a channel
If JIM_TCL_COMPAT is set, create top level open, close, read, puts, etc.
load
----
load core command split out into jim-load.c
package
-------
package core command split out into jim-package.c
added 'package list'
posix
-----
Remove os.sleep, os.usleep, os.sethostname, os.signal, pit, Jpit
Most of these are in 'signal'
|