Commit graph

196 commits

Author SHA1 Message Date
Andreas Rumpf
feef109e60 make tests green again 2018-05-18 20:53:41 +02:00
Araq
bbb0fd4eb7 remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
Oscar Nihlgård
fdf1d12380 Change type of Timeval.tv_sec to posix.Time (#7646) 2018-04-18 21:24:28 +02:00
Michał Zieliński
b2060acbc4 osproc: fix double close on POSIX (#5724)
Calling close() in some cases issued two close() syscalls to one FD, which is incorrect in multithreaded programs.
2018-04-16 20:02:26 +02:00
Eugene Kabanov
0b99e8e8cb Fix compiler stuck on waiting C/CPP backends. (#7472) 2018-04-02 21:54:27 +02:00
Andreas Rumpf
f9b742c72a make osproc.execProcesses more robust 2018-02-25 16:02:52 +01:00
GULPF
a879973081 Better times module (#6552)
* First work on better timezones

* Update tests to new api.
Removed tests for checking that `isDst` was included when formatting, since `isDst` no longer affects utc offset (the entire utc offset is stored directly in `utcOffset` instead).

* Deprecate getLocaltime & getGmTime
* Add `now()` as a shorthand for GetTIme().inZone(Local)
* Add FedericoCeratto's timezone tests (#6548)
* Run more tests in all timezones

* Make month enum start at 1 instead of 0
* Deprecate getDayOfWeekJulian
* Fix issues with gc safety
* Rename TimeInfo => DateTime
* Fixes #6465
* Improve isLeapYear
* FIx handling negative adjTime

* Cleanup:
- deprecated toSeconds and fromSeconds, added fromUnix and toUnix instead (that returns int64 instead of float)
- added missing doc comments
- removed some unnecessary JS specific implementations

* Fix misstake in JS `-` for Time

* Update usage of TimeEffect
* Removed unecessary use of `difftime`
* JS fix for local tz
* Fix subtraction of months
* Fix `days` field in `toTimeInterval`
* Style and docs
* Fix getDayOfYear for real this time...
* Fix handling of adding/subtracting time across dst transitions
* Fix some bad usage of the times module in the stdlib
* Revert to use proper time resoultion for seeding in random.nim
* Move deprecated procs to bottom of file
* Always use `epochTime` in `randomize`
* Remove TimeInterval normalization
* Fixes #6905

* Fix getDayOfWeek for year < 1
* Export toEpochDay/fromEpochDay and change year/month/monthday order
* Add asserts for checking that the monthday is valid
* Fix some remaining ambiguous references to `Time`
* Fix ambiguous reference to Time
2017-12-18 23:11:28 +01:00
cheatfate
e952ada1ba Fix 2017-12-13 00:36:14 +02:00
cheatfate
0429f41e98 execProcesses optimization. 2017-12-12 20:00:14 +02:00
cheatfate
e672249859 Windows: Fix invalid handle value for execProcesses.
Windows. Fix named pipes leak.
2017-12-12 16:53:09 +02:00
cheatfate
59d4530562 Remove -3 as marker of exited process.
Cache exiting process for Windows to omit unnecessary syscalls.
Fix closing hThread for Windows.
Fix for pause/resume on Windows.
Fix process handle leak on Windows.
Change behavior for waitForExit on Windows.
2017-12-11 21:12:07 +02:00
Andreas Rumpf
6e08ae5c26 merged patch #6876 manually, taking care of poDemon 2017-12-11 11:57:21 +01:00
Andreas Rumpf
8646a56738 Merge branch 'nexecProcesses' of https://github.com/cheatfate/Nim into cheatfate-nexecProcesses 2017-12-01 02:06:51 +01:00
cheatfate
fbe0ae74fb Explicit array initialization removed. 2017-11-29 03:57:29 +02:00
cheatfate
c4a57e711b Fix nimrtl troubles. 2017-11-28 14:40:33 +02:00
cheatfate
c6c0d28a4f Refactored version of execProcesses with test. 2017-11-28 14:03:09 +02:00
Araq
439b72b402 osproc improvement: check API consistency in order to prevent bug #6820 2017-11-28 02:19:39 +01:00
Fredrik Høisæther Rasch
f6a8cba7b5 Move quoteShell to ospaths (#6794)
Enables quoteShell on nimscript
2017-11-24 14:42:59 +01:00
Lynn C. Rees
0ab373115c Trim remaining expr/stmt from stdlib (#6742) 2017-11-15 17:34:48 +01:00
Fredrik Høisæther Rasch
de97f381fa Fix path for sh on Android (#6661) 2017-11-03 21:09:01 +01:00
Andreas Rumpf
c4dcbb45f4 osproc.execProcesses: enable poParentStreams for posix; should make travis green again 2017-10-26 09:19:18 +02:00
Araq
ea535ed1ff osproc on Windows: fix peekExitCode for closed processes 2017-10-25 17:37:03 +02:00
Araq
4b350d2632 osproc: fixes a memory leak affecting Windows 2017-09-30 15:36:13 +02:00
araq
85dc40c121 fixes #1734, fixes #3138, fixes #3759 2017-09-01 19:25:08 +02:00
Fredrik Høisæther Rasch
c39e202976 Introduce first class support for Android (#5772) 2017-08-06 02:18:15 +02:00
Ruslan Mustakov
0a76387ba4 Fix posix_spawn error handling (#5826)
posix_spawn doesn't set errno - it returns the error code.
2017-05-17 22:40:55 +02:00
Dominik Picheta
fa3436fb65 Deprecate osproc.select(). Refs #90. 2017-05-09 15:14:47 +01:00
Jacek Sieka
0055729755 WIFSIGNALED means process has exited too (with a bang!) (#5678) 2017-04-27 21:39:32 +02:00
Eugene Kabanov
d701de5733 Fix osproc.peekExitCode() to handle exitcode properly. (#5555) 2017-03-17 10:02:36 +01:00
Eugene Kabanov
336a7c9b3f Fixes to support Dragonfly BSD. (#5552)
* Fix kqueue.nim and ansi_c.nim to support dragonfly.
* Fix ioselectors.nim, threads.nim to support dragonfly.
* Fix deprecated dealloc call in tioselectors.nim.
* Fix tfsmonitor.nim test to run only on Linux.
* Fix osproc.nim return wrong exit codes.
* Fix getAppFilename() for dragonfly.
* Fix proper exit code handling.
2017-03-17 08:22:11 +01:00
Araq
92ecbc9958 fixes #5179 2017-01-07 03:05:48 +01:00
Johannes Hofmann
95188edf6f make sure first call to running() after process exit returns false 2016-12-03 14:07:08 +01:00
Johannes Hofmann
b453a8e616 check waitpid() return value before setting exitStatus
This fixes a race with parallelBuild on DragonFly BSD.
2016-12-02 22:24:42 +01:00
Andreas Rumpf
0a6787f956 better error handling for osproc.nim 2016-11-05 09:04:16 +01:00
cheatfate
0c69891b8d One more attempt to fix #4867 2016-10-21 11:15:33 +03:00
Johannes Hofmann
52db21bb2c convert exitStatus to exit code 2016-09-30 10:19:57 +02:00
Johannes Hofmann
1dccbaf9a0 another attempt at properly declaring the status variable 2016-09-25 10:16:14 +02:00
Johannes Hofmann
14f72bcbac make status variable local 2016-09-25 09:51:23 +02:00
Johannes Hofmann
829b706440 rename exitCode to exitStatus 2016-09-24 14:46:07 +02:00
Johannes Hofmann
5986b78bbe generally update exitCode only after successful completion of waitpid() 2016-09-22 10:55:21 +02:00
Johannes Hofmann
93160547a9 reset p.exitCode in peekExitCode on Posix when process did not exit (#4793)
* reset p.exitCode in peekExitCode on Posix when process did not exit

fixes #4792

* fix indentation
2016-09-17 22:03:14 +02:00
Dominik Picheta
5784e43662 Add warning to osproc.close 2016-07-21 16:14:00 +01:00
Dmitry Polienko
46dad3cb6b Fix environment handling in startProcess 2016-07-19 20:38:00 -07:00
Dmitry Polienko
9bd952d2c2 Revert changes in osproc.nim 2016-07-19 20:33:25 -07:00
Dmitry Polienko
5f773bf478 Fix passing environment in startProcess (win)
Previous implementation used newWideCString, which doesn't
handle strings with \0 characters.
2016-07-18 23:28:40 -07:00
Andreas Rumpf
0834cd63d9 prepare Nim codebase for upcoming parser changes 2016-07-15 12:56:03 +02:00
Andreas Rumpf
82a75635f7 installer fixes and improvements 2016-06-07 13:47:37 +02:00
cheatfate
d4f3db3bd0 Resolve bugs 2016-05-24 01:37:31 +03:00
cheatfate
b27ee842d4 Resolve #4200
Resolve [Deprecated] warning for raiseOsError at line 878
2016-05-24 00:33:05 +03:00
def
bf8e371d7e Revert raiseOSError change 2016-02-06 01:29:12 +01:00