summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorportix <none@none>2012-12-20 12:00:25 +0100
committerportix <none@none>2012-12-20 12:00:25 +0100
commitbb996253cec57495723701ed32facbe29e7ad0f3 (patch)
tree093b60bb2143b0257a38114999cad4d81612edcc /api
parent3663dab0686f2c32c35b5d0aceee7265bdf5b115 (diff)
downloaddwb-bb996253cec57495723701ed32facbe29e7ad0f3.zip
Return a deferred from system.spawn
Diffstat (limited to 'api')
-rw-r--r--api/dwb-js.724
-rw-r--r--api/jsapi.7.txt20
-rw-r--r--api/jsapi.txt21
3 files changed, 12 insertions, 53 deletions
diff --git a/api/dwb-js.7 b/api/dwb-js.7
index a614259a..2a12e950 100644
--- a/api/dwb-js.7
+++ b/api/dwb-js.7
@@ -2,12 +2,12 @@
.\" Title: dwb-js
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\" Date: 12/19/2012
+.\" Date: 12/20/2012
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
-.TH "DWB\-JS" "7" "12/19/2012" "\ \&" "\ \&"
+.TH "DWB\-JS" "7" "12/20/2012" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -808,7 +808,7 @@ true if creation was successful or directory already existed
.nr an-break-flag 1
.br
.ps +1
-\fBSpawnError system.spawn(String command, [Function stdin], [Function stderr])\fR
+\fBDeferred system.spawn(String command, [Function stdin], [Function stderr])\fR
.RS 4
.sp
Executes a shell command using the default search path
@@ -830,7 +830,7 @@ Callback function for stderr, optional
.PP
\fIreturns\fR
.RS 4
-SpawnError if an error occured, 0 otherwise
+A deferred, it will be resolved if the child exits normally, it will be rejected if the child process exits abnormally, the first parameter of the reject function will be the status code of the child process\&.
.RE
.RE
.sp
@@ -3107,22 +3107,6 @@ const NavigationReason = {
.if n \{\
.RE
.\}
-.SS "SpawnError"
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-const SpawnError = {
- success : 0,
- spawnFailed : 1<<0,
- stdoutFailed : 1<<1,
- stderrFailed : 1<<2
-};
-.fi
-.if n \{\
-.RE
-.\}
.SS "Modes"
.sp
.if n \{\
diff --git a/api/jsapi.7.txt b/api/jsapi.7.txt
index 090865da..3bfbf883 100644
--- a/api/jsapi.7.txt
+++ b/api/jsapi.7.txt
@@ -368,7 +368,7 @@ _mode_;; The permissions the directory will get
_returns_;; true if creation was successful or directory already existed
****
-==== SpawnError system.spawn(String command, [Function stdin], [Function stderr])
+==== Deferred system.spawn(String command, [Function stdin], [Function stderr])
****
Executes a shell command using the default search path
@@ -377,7 +377,9 @@ _command_;; The command to execute
_stdin(String)_;; Callback function for stdin, pass null if only stderr is
needed, optional
_stderr(String)_;; Callback function for stderr, optional
-_returns_;; SpawnError if an error occured, 0 otherwise
+_returns_;; A deferred, it will be resolved if the child exits
+normally, it will be rejected if the child process exits abnormally, the first
+parameter of the reject function will be the status code of the child process.
****
==== Object system.spawnSync(String command)
@@ -1541,20 +1543,6 @@ const NavigationReason = {
--------
****
-=== SpawnError
-
-****
-[source,javascript]
---------
-const SpawnError = {
- success : 0,
- spawnFailed : 1<<0,
- stdoutFailed : 1<<1,
- stderrFailed : 1<<2
-};
---------
-****
-
=== Modes
****
diff --git a/api/jsapi.txt b/api/jsapi.txt
index 4355af15..f6122dde 100644
--- a/api/jsapi.txt
+++ b/api/jsapi.txt
@@ -630,7 +630,7 @@ _returns_;; +true+ if creation was successful or directory already existed
[source,javascript]
----
-SpawnError system.spawn(String command, [Function stdin], [Function stderr])
+Deferred system.spawn(String command, [Function stdin], [Function stderr])
----
Executes a shell command using the default search path
@@ -641,7 +641,9 @@ _command_;; The command to execute
_stdin(String)_;; Callback function for stdin, pass +null+ if only stderr is
needed, optional
_stderr(String)_;; Callback function for stderr, optional
-_returns_;; <<SpawnError>> if an error occured, 0 otherwise
+_returns_;; A deferred, it will be resolved if the child exits
+normally, it will be rejected if the child process exits abnormally, the first
+parameter of the reject function will be the status code of the child process.
****
****
@@ -2734,21 +2736,6 @@ const NavigationReason = {
****
****
-[[SpawnError]]
-[float]
-==== *SpawnError* ====
-[source,javascript]
---------
-const SpawnError = {
- success : 0,
- spawnFailed : 1<<0,
- stdoutFailed : 1<<1,
- stderrFailed : 1<<2
-};
---------
-****
-
-****
[[Modes]]
[float]
==== *Modes* ====