Git Product home page Git Product logo

Comments (3)

eregon avatar eregon commented on July 20, 2024

We would need a reproducer to investigate this.

childprocess has IIRC 0 differences between Linux and macOS, e.g. process.stop is:

def stop(timeout = 3)
assert_started
send_term
begin
return poll_for_exit(timeout)
rescue TimeoutError
# try next
end
send_kill
wait
rescue Errno::ECHILD, Errno::ESRCH
# handle race condition where process dies between timeout
# and send_kill
true
end

You could try to do the same using bare Kernel#spawn without ChildProcess, that would most likely have the same result, if so showing it's not an issue of ChildProcess. It could be an issue of Kernel#spawn itself, but unlikely, probably either some difference based on the OS itself, or some bug in mydir/myscript (I'd think more likely).

from childprocess.

eregon avatar eregon commented on July 20, 2024

BTW:

if @args.size == 1
# When given a single String, Process.spawn would think it should use the shell
# if there is any special character in it. However, ChildProcess should never
# use the shell. So we use the [cmdname, argv0] form to force no shell.
arg = @args[0]
args = [[arg, arg]]

So ChildProcess should never use a shell around the subprocess.

from childprocess.

jjb avatar jjb commented on July 20, 2024

okay, thanks so much for all for the info. sorry for no reproduction script. i hacked around with it inside a circleCI ssh session and am sure i did everything parallel in both environments. prob won't have time to dig deeper.

from childprocess.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.