1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-13 06:43:42 +00:00
Commit Graph

54 Commits

Author SHA1 Message Date
Bryan Roe
97ad48f2f2 1. Added ILibChain_WriteEx()
2. Updated ILibChain_Continue() on windows to take an optional list of HANDLE**
3. Updated net.socket IPC on Windows  to use ILibChain_ReadEx and ILibChain_WriteEx
4. Fixed child_process.waitExit() on windows to pass only the wait handles for the process
5. Added GetWaitHandles() to ILibProcessPipe
2020-05-15 17:25:49 -07:00
Bryan Roe
9a4f2edfef Fixed compiler warning, and updated fix 2020-05-11 14:17:25 -07:00
Bryan Roe
a4c5430879 Updated windows path to use ReadEx when overlapped is supported 2020-05-09 11:02:16 -07:00
Bryan Roe
b2b78a3dbe Fixed so current node can be removed while being dispatched 2020-05-08 19:37:16 -07:00
Bryan Roe
7dc8ee4ef4 Added memory ownership for buffer 2020-05-07 18:19:14 -07:00
Bryan Roe
2ae485dad8 Fixed dwErrorStatus check 2020-05-07 11:27:05 -07:00
Bryan Roe
9668b8d77d Update to use new threading model for windows 2020-05-07 10:29:49 -07:00
Bryan Roe
5fb0cef7db 1. Removed debug message from child-container
2. Fixed WriteEx() behavior
3. Fixed AddWaitHandle() to use APC if called from wrong thread
4. Fixed net.ipcSocket to return correct value if write completed right away
2020-05-05 16:12:23 -07:00
Bryan Roe
d26701c731 Updated ReadEx 2020-05-05 13:27:03 -07:00
Bryan Roe
969909cca7 Updated WriteEx 2020-05-05 02:00:07 -07:00
Bryan Roe
1bd4e3d07c Updated Windows Chain logic, to use WSAEventSelect and WaitForMultipleObjectsEx 2020-05-04 17:25:55 -07:00
Bryan Roe
941ac6e192 1. Added NULL check
2. Added process._exit()
3. Fixed CancelIOEx usage
2020-05-03 19:40:32 -07:00
Bryan Roe
71bd469551 fix 2020-04-29 03:01:44 -07:00
Bryan Roe
417cab5a83 Fixed typo 2020-04-18 14:24:24 -07:00
Bryan Roe
743a38eeeb 1. Updated WaitHandle_Add2 to no use APC to dispatch to event loop, becuase winsock is not re-entrant, and don't want to risk corruption
2. Updated memory handling for async methods in Generic Marshal
2020-04-18 13:53:38 -07:00
Bryan Roe
937ae3b5d2 Added pid check for forkpty() initialization 2020-02-05 13:07:56 -08:00
Bryan Roe
ee10dbeb17 Fixed #include for FreeBSD 2020-02-05 11:13:25 -08:00
Bryan Roe
91ec72b34d Fixed #include for FreeBSD/MacOS 2020-02-05 11:04:09 -08:00
Bryan Roe
afe0deacb2 Fixed bug where interactive shell was redirecting stderr 2020-02-04 17:15:51 -08:00
Bryan Roe
32592bd622 1. Updated environment variables, so that string values are coerced
2. Added ability to specify termios struct values via environment variables
2020-02-04 15:23:52 -08:00
Bryan Roe
3c7d5effb2 1. Added pty and tcsetsize to child_process
2. Added ILibProcessPipe_Process_GetPTY to ILibProcessPipe
2020-01-27 17:08:45 -08:00
Bryan Roe
a9ef6d0f61 1. Fixed detached processes on Windows
2. Updated service-manager on Windows to add an uninstaller into Program Manager
3. Updated service-manager on Windows to try to delay spawn a process to delete a service, which is required if the service to be uninstalled is the currently running process.
2020-01-15 14:53:12 -08:00
Bryan Roe
4998eb173f Fixed edge case bug on Windows, where a Resume could result in ReadFile getting called before getOverlappedResult was called, corrupting the read buffer. 2019-12-23 17:11:12 -08:00
Bryan Roe
8356cbf190 Added missing #ifdef around Windows Specific fixes 2019-12-05 10:56:13 -08:00
Bryan Roe
37acfa64f0 Fixed windows race condition between garbage collecting spawned process and exit handler, if the memory was reclaimed at just the right time 2019-11-28 09:57:04 -08:00
Bryan Roe
bac3533d29 Added missing #ifdef 2019-10-31 10:59:46 -07:00
Bryan Roe
1be7ee3394 Fixed DoWhile readloop on Windows, to fix some edge case reading race conditions 2019-10-29 10:58:41 -07:00
Bryan Roe
72db242dee Added ability to end stdin on child_process spawned process 2019-09-06 21:41:48 -07:00
Bryan Roe
fa6836d17a Added ability to generate Dump file on crash, on Windows 2019-08-26 14:16:39 -07:00
Bryan Roe
84882e0b52 Fixed the following bugs on Windows:
1. Normally when a process exits when a stream is paused, I delayed the exit propagation until resume was called, so data was not lost. However, if no data was read, resume may not get called, causing the descriptor to continually trigger the event loop. For example, if the user explicity killed the process, resume won't get triggered after the fact.

2. If the above descriptor continually triggers the event loop, other descriptors will not get serviced, which can cause a stall

3. The above two issues caused KVM issues on windows, where it would not clean up properly and leak handles because the exit wasn't gettign called. But at the same time there's a race condition depending on where in the event list the descriptor is, could cause future KVM sessions to stall.
2019-08-23 17:07:12 -07:00
Bryan Roe
66273f8950 1. Updated waitExit() for windows to support a timeout
2. Updated ProcessPipe for Windows, to disable inheritance on detach
3. Updated service-manager to support restart on self for windows
2019-08-07 15:23:13 -07:00
Bryan Roe
a89a3204c1 1. Added ability to query if Select was interrupted with APC
2. Updated So that before readableStream and 'exit' are dispatched, APC's are unrolled if 'select' was interrupted, preventing stack corruption caused by trying to make a re-entrant winsock call, which is not supported by winsock.
2019-08-07 11:32:33 -07:00
Bryan Roe
4cef81719e 1. Fixed upper limit for inline JS on command line
2. Updated win-info to be able to fetch list of installed apps
2019-07-31 15:14:01 -07:00
Bryan Roe
3efdc27478 1. Updated so that APCs are used for thread dispatching for Read/Exit on Windows
2. Updated to add support for child_process.waitExit() on Windows.
2019-07-23 16:16:53 -07:00
Bryan Roe
124c0d386f Initial modifications to support FreeBSD 2019-06-17 15:45:46 -07:00
Bryan Roe
9f99051e20 1. Fixed re-entrancy issue with Pre/Post select when WaitExit is used
2. Updated cleanup, so that the processing loop unwinds first
2019-06-13 13:47:26 -07:00
Bryan Roe
4451e12e7a Updated Cleanup for Linux/MacOS, still need to fix 2019-06-06 18:47:41 -07:00
Bryan Roe
f15c11c845 1. Updated MacOS, so detached child process uses fork instead of vfork
2. Updated detached to be a bitmask on the type
3. Updated MacOS message-box cleanup
2019-06-04 13:06:17 -07:00
Bryan Roe
26d86ce449 Added canary check to mitigate crash on linux 2019-05-16 23:38:51 -07:00
Bryan Roe
d0fb36d10b Add ability to specify detached=true in options 2019-05-12 21:39:02 -07:00
Bryan Roe
6770921ca7 Updated ReadEx/WriteEx so it returns status, which can be used to detect broken pipe 2019-05-01 21:19:56 -07:00
Bryan Roe
40b3ca4d03 1. Added CancelEx
2. Updated, so if ReadEx is used, buffer is not freed directly
2019-05-01 16:10:58 -07:00
Bryan Roe
8c6a230d1e 1. Fixed bug with createConnection()
2. Updated Windows IPC
2019-04-30 15:15:20 -07:00
Bryan Roe
1e58eaf103 Experimental 2019-04-26 16:07:06 -07:00
Bryan Roe
429b645a54 1. Added ability to modify environment variables on ScriptContainers
2. Fixed bug, where child ScriptContainer would exit if return value had a JSON parse error
2019-03-12 22:23:30 -07:00
Bryan Roe
ae72740a18 1. Updated ILibProcessPipe, so that buffer will grow as necessary
2. Updated Windows KVM, to add an accumulator for JUMBO commands
2019-02-06 16:32:31 -08:00
Bryan Roe
aeaa229e31 1. Modified WebRTC_DataChannel to use union, to simplify struct def
2. Added ChainLink MetaData
3. Added 'ChainViewer' to allow JS to debug Chain events
2019-02-01 23:33:02 -08:00
Bryan Roe
bd16538a8e Fixed compiler warnings on MacOS 2019-02-01 01:13:07 -08:00
Bryan Roe
a3f69396f6 Added MacOS support
Added ability to spawn process with specific user, under linux
Fixed edge case memory leak caused when we were trying to QueueUserAPC to a thread we were already on, which also caused a 3 second delay.
Changed WindowsRunLoop, to detect bad HANDLEs, and event an error on them, and remove them from list
Fixed linux bug, where a spawned child called 'exit' instead of '_exit' in an error condition
2019-01-11 12:42:16 -08:00
Ylian Saint-Hilaire
3c80473a94 Major agent update. 2018-09-05 11:01:17 -07:00