summaryrefslogtreecommitdiff
path: root/src/library/scala/sys
Commit message (Collapse)AuthorAgeFilesLines
* `def run(log: ProcessLogger, connectInput: Boolean): Process` doesn't block ↵Pablo Fco. Pérez Hidalgo2017-03-241-4/+3
| | | | | | until the spawned process exits neither does it return its exit code.
* Changing deprecation warning to lineStreamMarkus Jura2017-02-131-2/+2
| | | | | | The deprecation text of `ProcessBuilder.lines(log: ProcessLogger)` and `ProcessBuilder.lines_!(log: ProcessLogger) mentions to use the method `stream` and `stream_!` respectively. These methods do not exists. The text has been changed to use `lineStream` and `lineStream_!` respectively.
* Merge pull request #5481 from som-snytt/issue/10007-processLukas Rytz2016-11-182-22/+26
|\ | | | | SI-10007 sys.process thread sync
| * SI-10007 sys.process thread syncSom Snytt2016-11-172-22/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A previous change to replace `SyncVar.set` with `SyncVar.put` breaks things. This commit tweaks the thread synchronizing in `sys.process` to actually use `SyncVar` to sync and pass a var. Joining the thread about to exit is superfluous. A result is put exactly once, and consumers use non-destructive `get`. Note that as usual, avoid kicking off threads in a static context, since class loading cycles are somewhat dicier with 2.12 lambdas. In particular, REPL is a static context by default. SI-10007 Clarify deprecation message The message on `set` was self-fulfilling, as it didn't hint that `put` has different semantics. So explain why `put` helps avoid errors instead of creating them. SI-10007 Always set exit value Always put a value to exit code, defaulting to None. Also clean up around tuple change to unfortunately named Future.apply. Very hard to follow those types. Date command pollutes output, so tweak test.
* | Typo and spelling correctionsJanek Bogucki2016-11-112-3/+3
|/
* Merge 2.11.x into 2.12.xAdriaan Moors2016-10-182-9/+9
|\ | | | | | | Including PRs #5199, #5405
| * In ProcessBuilder docs, replace .lines w/ .lineStreamPaul Kernfeld2016-09-162-9/+9
| | | | | | | | ProcessBuilder.lines is deprecated
* | Typo fix in scala.sys.process.ProcessBuilder.Steven Mitchell2016-08-021-2/+2
| |
* | Lower-case spelling of @deprecated messagesSimon Ochsenreither2016-05-282-9/+9
| |
* | SI-9684 Deprecate JavaConversionsSom Snytt2016-04-221-2/+2
| | | | | | | | | | | | | | | | | | Implicit conversions are now in package convert as ImplicitConversions, ImplicitConversionsToScala and ImplicitConversionsToJava. Deprecated WrapAsJava, WrapAsScala and the values in package object. Improve documentation.
* | Use System.lineSeparator, rather than sys.propsJason Zaugg2016-03-291-1/+1
| |
* | Resolve warnings related to SyncVar#setKota Mizushima2016-03-182-5/+5
| | | | | | | | Replace it with SyncVar#put
* | Merge pull request #4875 from slothspot/ticket/9454Lukas Rytz2015-12-182-9/+14
|\ \ | | | | | | [SI-9454] Add isAlive method into sys.process.Process trait
| * | [SI-9454] Add isAlive method into sys.process.Process traitDmitry Melnichenko2015-12-112-9/+14
| | |
* | | SI-9583: Update SystemProperties.empty to return a mutable.Map to fix buildersShane Delmore2015-12-101-1/+1
|/ /
* | SI-9555 Refactor SystemProperties to avoid mutable mapJason Zaugg2015-11-131-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A mutable map with help text was lazy populated if and when lazy vals containing `BooleanProp` for a particular system was initialized. Reviewing this code, I noticed two problems: the class doesn't appear to be designed for multithreaded access (e.g. someone could call `help` while the map is being updated.), and the help method won't return anything until the vals below are accessed for the first time. We don't use the help method anywhere else, but kept it around in the unlikely event it was being used by some other tool. I've done away with the mutable map by just moving the help messages into a match in the help method itself.
* | Merge commit 'bb3ded3' into merge-2.11-to-2.12-oct-5Lukas Rytz2015-10-051-2/+2
|\|
| * Fix typo in Process.scalaRyan Zhang2015-09-291-2/+2
| |
* | Merge commit 'a170c99' into 2.12.xLukas Rytz2015-09-221-2/+2
|\|
| * Improve drifted URLsJanek Bogucki2015-09-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Any.scala: Link to the guide instead of the SIP. - AnyVal.scala: Remove SIP link and align guide link to Any.scala. - Commands.scala: Use a less out of date team link. - Logic.scala: Link was broken. Substitute found. - Process.scala: Links were 403 & 404. Fixed as this is a code sample. - TypeMaps.scala: Move old EPFL Trac to JIRA. - RedBlackTree.scala: Replaced broken link with substitutes based on site maintainer input [1]. [1] When asked where Data-Set-RBTree.html had gone Don@UNSW advised "I think it's on the Haskell wiki now. It was Chris Okazaki's version". The closest I could find to what this document probably was is this paper by Hinze edited by Okasaki, http://www.cs.ox.ac.uk/ralf.hinze/publications/WAAAPL99b.ps.gz The paper cites the Okasaki document so I included a link to that as well. The Haskell Wiki does have a link to a RB document but that's broken too, https://wiki.haskell.org/Research_papers/Data_structures > Constructing red-black trees
* | Merge remote-tracking branch 'origin/2.11.x' into 2.12.xSeth Tisue2015-08-201-1/+2
|\| | | | | | | | | | | | | | | | | | | all conflicts were because the changes changed code that doesn't exist anymore in 2.12; they were resolved with `git checkout --ours` c201eac changed bincompat-forward.whitelist.conf but I dropped the change in this merge because it refers to AbstractPromise which no longer exists in 2.12
| * Wait until the cat process is finished.Li Yao2015-08-071-1/+2
| |
| * Fix the bug in the example in scala.sys.processLi Yao2015-07-111-1/+1
| | | | | | There's no `!` method with argument type `ProcessIO`. I suppose this is intended to be `run`.
* | Align noTraceSuppression val names to system property nameJanek Bogucki2015-07-201-1/+3
| | | | | | | | | | | | | | For vals based on the scala.control.noTraceSuppression system property align the val name to the property name. Deprecate the existing val.
* | Merge remote-tracking branch 'origin/2.11.x' into ↵Jason Zaugg2015-07-132-0/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | merge/2.11.x-to-2.12.x-20150713 Conflicts: src/eclipse/partest/.classpath src/eclipse/repl/.classpath test/files/run/nothingTypeNoFramesNoDce.scala test/files/run/repl-javap-app.check Also fixup two .classpath files with updated partest, xml and parser combinators JARs.
| * SI-9206: REPL custom welcome messageSom Snytt2015-06-232-0/+5
| | | | | | | | | | | | | | | | Can be specified by `-Dscala.repl.welcome=Greeting` or in properties file. It takes the same format arguments as the prompt, viz, version, Java version and JVM name. It can be disabled by `-Dscala.repl.welcome` with no text.
* | Merge branch '2.11.x' into merge/2.11.x-to-2.12.x-20150624Jason Zaugg2015-06-241-3/+4
|\|
| * SI-9206 BooleanProp if set and not untrueSom Snytt2015-06-181-3/+4
| | | | | | | | | | | | | | | | | | Previously, handy `sys.BooleanProp.keyExists` ignored the property value. While trying not to make any real estate puns, this commit will let it go false if a value is supplied that is not true in the usual Java sense. But what is truth? Allows `scala -Dscala.color=off`, for example.
* | Merge remote-tracking branch 'origin/2.11.x' into ↵Jason Zaugg2015-05-012-2/+2
|\| | | | | | | merge/2.11.x-to-2.12.x-20150501
| * Fix many typosMichał Pociecha2015-04-212-2/+2
| | | | | | | | | | This commit corrects many typos found in scaladocs and comments. There's also fixed the name of a private method in ICodeCheckers.
* | SI-7775 Exclude nulls when iterating sys propsSom Snytt2015-03-021-2/+9
| | | | | | | | | | | | | | | | | | | | | | The previous fix to deal with concurrent modification of system properties doesn't handle null results introduced when a property is removed. This commit filters nulls for safety, and also adds a `names` method to `sys.SystemProperties`. The test is upgraded.
* | Merge remote-tracking branch 'origin/2.11.x' into ↵Jason Zaugg2015-01-291-1/+1
|\| | | | | | | | | | | | | | | | | merge/2.11.x-to-2.12.x-20150129 Conflicts: build.number src/library/scala/concurrent/Future.scala versions.properties
| * Fix scaladoc OutpuStream typoEric Peters2014-12-121-1/+1
| |
* | Merge commit '7ba38a0' into merge/2.11.x-to-2.12.x-20150129Jason Zaugg2015-01-291-0/+2
|\| | | | | | | | | | | | | | | Conflicts: build.number src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala src/library/scala/collection/Iterator.scala versions.properties
| * Correct collections variable definitions to avoid many scaladoc warnings.Eugene Vigdorchik2014-11-061-0/+2
| |
* | Merge commit '1b98061' into merge/2.11.x-to-2.12.x-20140915Jason Zaugg2014-09-161-5/+4
|\|
| * SI-8817 Correct scaladoc for scala.sys.addShutdownHookterma2014-09-111-5/+4
| | | | | | | | | | - Remove mention that shutdown hook is daemon thread - Add link on scala.sys.ShutdownHookThread class
| * [backport] Fixes cut sentences in the generated scaladocsDominik Gruntz2014-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes all first sentences of library functions which contain `i.e.` or `e.g.` and adds a `,` to prevent that the scaladoc summary sentence is cut after this abbreviation. This is possible as pull/3824 fixed how Scaladoc parses the first sentence of a method description into a sumary sentence(now the first sentence has to end with a dot followed by whitespace). Only docs in the core library are changed (src/library/**/*.scala) and only if they occur in the first sentence. Review by @heathermiller (cherry picked from commit 72721ff5dd06dea1235ecb71acae0bd61aee4814)
* | Merge pull request #3920 from rubyu/issue/7350Grzegorz Kossakowski2014-09-013-73/+93
|\ \ | | | | | | SI-7350 Prevent resource leaks in PipedProcesses.runAndExitValue()
| * | SI-7350 Prevent resource leaks in PipedProcesses.runAndExitValue()rubyu2014-08-073-73/+93
| |/
* / Fixes cut sentences in the generated scaladocsDominik Gruntz2014-08-061-1/+1
|/ | | | | | | | | | | | | | | This commit changes all first sentences of library functions which contain `i.e.` or `e.g.` and adds a `,` to prevent that the scaladoc summary sentence is cut after this abbreviation. This is possible as pull/3824 fixed how Scaladoc parses the first sentence of a method description into a sumary sentence(now the first sentence has to end with a dot followed by whitespace). Only docs in the core library are changed (src/library/**/*.scala) and only if they occur in the first sentence. Review by @heathermiller
* SI-5994 battling implicits for String.linesRex Kerr2014-02-102-14/+36
| | | | | | | | | | | | | | Deprecated ProcessBuilder's lines method and renamed it lineStream. stream was another possibility, but that seemed more likely to cause conflicts. streaming was also tried, but feedback was in favor of lineStream. Also updated tutorial in ProcessBuilder. I am sure this will break some tests, but because of the name conflict it's hard to be sure where they are. So Jenkins gets to find the problems for me. Changed name to lineStream.
* Fix typos in documentationOlivier Blanvillain2013-12-281-1/+1
|
* Fix typo in documentation.Jiawei Li2013-09-161-1/+1
|
* Merge pull request #2867 from mmorearty/patch-1Adriaan Moors2013-08-231-1/+1
|\ | | | | Fix typo in sample code in scaladoc for package scala.sys.process
| * Fix typo in sample code in scaladoc for package scala.sys.processMike Morearty2013-08-231-1/+1
| |
* | ProcessBuilder.lines(log) *does* throw an exception.Rike-Benjamin Schuppner2013-08-201-1/+1
|/
* Fix typo in DocumentationValerian2013-07-141-1/+1
|
* Remove dependency on xml in sys.process.Adriaan Moors2013-06-202-21/+1
| | | | Added deprecated conversions in xml.Elem to preserve source compatibility.
* SI-6488 Interrupt i/o threads on process destroySom Snytt2013-05-152-12/+20
| | | | | | | | | | | | | | | | | | | The previous fix uses Thread.stop to stop the threads which drain outputs, but should do something orderly. This commit interrupts the threads, which must check isInterrupted before attempting further i/o. The reading thread will suppress either the interruption or the IOException cited in the ticket. Similarly, i/o handlers must preserve and communicate interrupted status. The modest goal of this fix is to ameliorate any stack traces when the process is destroyed. The test runs itself as a sample process with output.