is-running icon indicating copy to clipboard operation
is-running copied to clipboard

A process which isn't running is incorrectly detected as running on linux

Open imor opened this issue 11 years ago • 1 comments

Hi nisaacson,

Below test case fails on linux while it is passing on windows. I tried to find a solution but couldn't, maybe you can help.

//require spawn
var spawn = require('child_process').spawn

it('syncronous should return false when spawned process is not running', function (done) {
    //try to spawn a process from a non-existent file
    var proc = spawn('ghosts-do-not-exist')
    //swallow the error to let the test pass
    proc.on('error', function (error) {
    });
    var pid = proc.pid
    var found = running(pid)
    assert.ok(!found, 'pid is running when it should not be')
    done()
  })

imor

imor avatar Jan 07 '14 05:01 imor

Y'all should probably close this if that last commit fixed the issue

j-refs avatar Feb 25 '24 08:02 j-refs