[
https://issues.apache.org/jira/browse/CB-12905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16044666#comment-16044666
]
ASF GitHub Bot commented on CB-12905:
-------------------------------------
Github user matrosov-nikita commented on a diff in the pull request:
https://github.com/apache/cordova-browser/pull/31#discussion_r121171981
--- Diff: node_modules/cordova-serve/src/exec.js ---
@@ -29,7 +29,15 @@ var child_process = require('child_process'),
module.exports = function (cmd, opt_cwd) {
var d = Q.defer();
try {
+ // In Linux, the callback is not called until the process
terminates.
+ // If the error is not caused within 2 seconds, then the promise
will be resolved.
+ var timer = setTimeout(() => {
+ if (process.platform == 'linux') {
+ d.resolve('timeout');
+ }
+ }, 2000);
child_process.exec(cmd, {cwd: opt_cwd, maxBuffer: 1024000},
function (err, stdout, stderr) {
--- End diff --
Were you able to figure out why callback is not called?
> LaunchBrowser promise in linux, not resolved until the browser process
> terminates.
> ----------------------------------------------------------------------------------
>
> Key: CB-12905
> URL: https://issues.apache.org/jira/browse/CB-12905
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-browser, cordova-serve
> Affects Versions: 6.5.0, 7.0.1
> Environment: OS: Ubuntu 16.04.2 LTS
> cordova: 6.5.0
> simulate: 0.3.12
> node: v7.10.0
> npm: 4.6.1
> Reporter: Pavel Yakovlev
> Priority: Minor
>
> LaunchBrowser promise in linux, not resolved until the browser process
> terminates.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]