Niklas Keller
2dcddfb761
Use deterministic path for exe copy outside phar
...
Fixes #37 .
2019-03-06 19:29:00 +01:00
Aaron Piotrowski
d51bd9a487
Send signals to child process instead of wrapper
2019-02-26 10:12:52 -06:00
Aaron Piotrowski
155960d7dd
Rename escape function
...
Renamed constants.php to functions.php since it now contains a function.
2019-02-25 22:50:25 -06:00
Chris Wright
6dd4b5600a
Use correct arg escape logic on windows ( #35 )
2019-02-25 22:38:36 -06:00
Aaron Piotrowski
2f79a32f04
Ignore termination signals in shell process
...
Fixes #36 .
2019-02-25 19:38:05 -06:00
Aaron Piotrowski
974c6e2048
Use correct FD index in FD array
2019-01-28 11:55:02 -06:00
Aaron Piotrowski
a461b7d975
Close unnecessary file descriptors in child process
2019-01-24 18:04:35 -06:00
Max Furtuna
e7e28219da
Fix #29 : Kill unresponsive processes
2019-01-15 15:42:43 -06:00
Aaron Piotrowski
90f3f31cbd
Remove getting wrapper STDERR contents
...
Windows was hanging on this call. I don't think the pipe needs to be emptied before closing on Windows, but we can revisit this in the future if needed.
2018-11-08 18:02:00 -06:00
Aaron Piotrowski
51874750e3
Resolve PID promise after marking process as running
2018-11-07 22:47:07 -06:00
Aaron Piotrowski
9d0d7ab360
Mark classes final
2018-10-20 11:34:05 -05:00
Aaron Piotrowski
5f5a901744
Add Process::__debugInfo()
...
Fixes #25 .
2018-10-15 10:12:17 -05:00
Aaron Piotrowski
b71e5c0544
Wait until process starts to make streams available
...
The process runners can be simplified in the future with this change without breaking BC.
2018-10-15 09:47:28 -05:00
Aaron Piotrowski
8ec002633b
Return promise from Process::start(); int from Process::getPid()
2018-10-14 23:27:39 -05:00
Aaron Piotrowski
9460633c7d
Use shared CS config; update styles
2018-10-14 23:16:09 -05:00
Niklas Keller
b795d20a7f
Copy wrapper exe outside the archive on Windows in case of PHARs
2018-04-08 20:55:42 +02:00
Niklas Keller
e0c753c53b
Fix double deferred resolution
2018-03-23 21:18:04 +01:00
Niklas Keller
239605b2e8
Remove outdated default property value
2018-03-08 16:09:10 +01:00
Niklas Keller
f8fd55993d
Defer handshake timeout in case the event loop is completely blocked
...
Fixes #21 .
2018-03-08 16:02:04 +01:00
Aaron Piotrowski
a13a2926a2
Avoid calling free() twice
2017-12-13 20:22:00 -06:00
Aaron Piotrowski
aeb22b9bda
Fix timing issues on streams
...
Killed or failed processes could lead to incorrect stream behaviors.
2017-12-06 19:21:06 -06:00
Aaron Piotrowski
8f837b3f94
Check status before failing join deferred
2017-12-06 17:37:08 -06:00
Aaron Piotrowski
f7f0931a7d
Resolve initial read with downstream promise
2017-12-05 09:39:29 -06:00
Aaron Piotrowski
0755a16660
Check if handle is still valid resource
2017-12-05 08:20:31 -06:00
Niklas Keller
2504312d90
Make deferred resolution more defensive
2017-12-05 12:38:59 +01:00
Niklas Keller
63ef6dd1c6
Null child PID watcher to prevent double resolve
2017-12-05 10:24:19 +01:00
Niklas Keller
e208c9f0be
Fix PID deferred on early terminate
2017-12-05 10:15:20 +01:00
Niklas Keller
9b7f14a7e3
Fail joinDeferred correctly on kill during startup
2017-12-05 09:49:00 +01:00
Niklas Keller
690d696dc9
Fix kill during startup on Windows
2017-12-05 09:44:06 +01:00
Niklas Keller
a7e750630c
Fix double deferred resolution if process spawn fails
2017-12-05 08:33:14 +01:00
peter279k
2a429681bd
Improve test coverage
2017-12-04 23:03:51 -06:00
Aaron Piotrowski
f1bf550910
functions.php → constants.php
2017-11-24 19:11:21 -06:00
Aaron Piotrowski
c818f508d3
Add coverage annotations
...
Windows only classes cause havoc with coverage numbers… open to suggestions on how to fix but at least now it won't look like we didn't even try testing. :-P
2017-11-24 19:08:30 -06:00
Niklas Keller
9a52085bc8
Use fully qualified function calls
2017-11-24 18:43:58 -06:00
Niklas Keller
8cbd431dab
Update Travis config and fix code style
2017-11-24 18:43:57 -06:00
Niklas Keller
96491ebfe1
Fix hanging if process is destroyed during startup
2017-11-24 18:43:57 -06:00
Niklas Keller
a9f60b8d89
Don't accept handshake if process already ended
...
This might happen if the process is destroyed while the wrapper tries to establish the connections.
2017-11-24 18:43:57 -06:00
Niklas Keller
071ec5bed7
Cancel child PID watcher on destroy and close sockets before proc_close
2017-11-24 18:43:57 -06:00
Niklas Keller
f7d6288d21
Fix loop hanging if process is killed during handshake on Windows
2017-11-24 18:43:57 -06:00
Niklas Keller
df827c767e
Close sockets correctly if process gets destroyed by GC
2017-11-24 18:43:57 -06:00
Niklas Keller
15385047fc
Explicitly shut down sockets after exit code has been received
2017-11-24 18:43:56 -06:00
Niklas Keller
e8e8597457
Resolve stdio streams directly after third socket connected
2017-11-24 18:43:56 -06:00
Niklas Keller
8f9d1d234a
Fix preconditions for getStdin / getStdout / getStderr
2017-11-24 18:43:56 -06:00
Niklas Keller
7cf91efd08
Refactor for full Windows compatibility
2017-11-24 18:43:56 -06:00
Niklas Keller
88f8865a6a
More refactoring for Windows compatibility with improved BC
2017-11-24 18:43:56 -06:00
Chris Wright
6d2b28f4f5
Refactor for full Windows compatibility
2017-11-24 18:43:56 -06:00
Aaron Piotrowski
c07c27f882
Use close() on object instead of fclose() on resource
2017-11-08 21:34:11 -06:00
Aaron Piotrowski
5aa6040fcf
More specific std* return types
2017-07-17 22:37:19 -05:00
Aaron Piotrowski
6ef9d34179
Close pipes before proc; resolve with promise on windows
2017-06-15 15:38:07 -05:00
Niklas Keller
a0cf19e999
Prevent busy loop, sleep 10ms between status queries
2017-06-15 21:29:45 +02:00