aboutsummaryrefslogtreecommitdiff
path: root/jimiocompat.h
AgeCommit message (Collapse)AuthorFilesLines
2023-07-04aio: change to use unix io, not stdioSteve Bennett1-0/+10
This changes especially makes buffered I/O work with non-blocking channels. - separate read and write buffering - support for timeout on blocking read - read/write on same channel in event loop with buffering - read buffer is the same across read, gets, copyto - autoflush non-blocking writes via event loop - copyto can now copy to any filehandle-like command - add some copyto tests Signed-off-by: Steve Bennett <steveb@workware.net.au>
2023-06-20file: use 64 bit stat functions if necessarySteve Bennett1-3/+19
Some 32 bit systems may require explicit use of stat64, etc. Fixes #263
2022-04-22build: win32: Fix build with tdm-gcc10.3Steve Bennett1-2/+2
Mostly we need to specifically target WinXP. Also silence deprecation warnings. And fix the confusion about _stat64 vs __stat64 Fixes #219 Signed-off-by: Steve Bennett <steveb@workware.net.au>
2022-04-14aio: TIP 603 - Implement stat of an open file handleSteve Bennett1-0/+8
Although the interface is different ('$handle stat' vs 'chan configure -stat') the behaviour is the same. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2022-04-14win32: Fix process handle vs pid distinctionSteve Bennett1-8/+12
On win32, a process is identified by a HANDLE, but for identifying a running process we should use GetProcessId() to return a meaningful integer. This means we need to be able to back and forth between a pid and a process handle (phandle). We also need to be careful to get the pid before the process handle closes since it isn't available afterwards. Also call the handle to intptr_t for open_osfhandle() to avoid a compiler warning. Fixes #217 Signed-off-by: Steve Bennett <steveb@workware.net.au>
2020-06-05windows: struct _stat64 should be struct __stat64Steve Bennett1-1/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2020-05-05file: stat: Fixes for 64 bit times on WindowsSteve Bennett1-11/+19
While -D__MINGW_USE_VC2005_COMPAT enables a 64-bit time_t, it is necessary to explicitly use _stat64 to access the stat structure containing 64 bit times. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-10-17signal, exec, wait, pid: improvements, especially to execSteve Bennett1-0/+80
- 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>