* Re: Bug: Cannot kill Nodejs process using ctrl + c [not found] <CAHaNChewK_4a7sPgZqWTNSmchiSbKOJUrpCrGLmcnR+cw6J5qw@mail.gmail.com> @ 2017-06-26 20:45 ` Gyandeep Singh 2017-06-27 2:55 ` Stefan Beller 2017-06-28 14:40 ` Johannes Schindelin 0 siblings, 2 replies; 7+ messages in thread From: Gyandeep Singh @ 2017-06-26 20:45 UTC (permalink / raw) To: git Environment: OS: Windows 7 Git: git version 2.13.1.windows.2 NodeJS: 8.1.2 Steps: 1. Create a js file with content const http = require('http'); const fs = require('fs'); const port = 3000; const app = http.createServer((req,res) => { res.writeHead(200); res.end("hi"); }); app.listen(port); its a simple server running on 3000 port. 2. Run command "node ./app.js" inside git bash. 3. hit "CTRL + c" (2 times) to kill the process. 4. If you look at taskmanager, then you will see a node.js process still running. or if you try to restart the server it will say port 300 already in use. Notes: 1. This was working on first version of Git 2.13, it broke after the first version. Thanks Regards, Gyandeep Singh ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: Cannot kill Nodejs process using ctrl + c 2017-06-26 20:45 ` Bug: Cannot kill Nodejs process using ctrl + c Gyandeep Singh @ 2017-06-27 2:55 ` Stefan Beller 2017-06-27 3:08 ` Gyandeep Singh 2017-06-28 14:40 ` Johannes Schindelin 1 sibling, 1 reply; 7+ messages in thread From: Stefan Beller @ 2017-06-27 2:55 UTC (permalink / raw) To: Gyandeep Singh; +Cc: git@vger.kernel.org Which exact outputs of Git are invoked? Does it change when giving slightly different options e.g. --no-pager? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: Cannot kill Nodejs process using ctrl + c 2017-06-27 2:55 ` Stefan Beller @ 2017-06-27 3:08 ` Gyandeep Singh 2017-06-27 3:15 ` Stefan Beller 0 siblings, 1 reply; 7+ messages in thread From: Gyandeep Singh @ 2017-06-27 3:08 UTC (permalink / raw) To: Stefan Beller; +Cc: git@vger.kernel.org Not sure what you mean by output. But its just goes back to normal like this Gyandeep@Gyandeep MINGW64 ~ $ It was working fine on first release of git 2.13. It broken with releases after that. Will try with –no-pager flag and let you tomorrow. Thanks Gyandeep Regards, Gyandeep Singh Website: http://gyandeeps.com On Mon, Jun 26, 2017 at 9:55 PM, Stefan Beller <sbeller@google.com> wrote: > Which exact outputs of Git are invoked? > > Does it change when giving slightly different options e.g. --no-pager? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: Cannot kill Nodejs process using ctrl + c 2017-06-27 3:08 ` Gyandeep Singh @ 2017-06-27 3:15 ` Stefan Beller 2017-06-27 3:17 ` Gyandeep Singh 0 siblings, 1 reply; 7+ messages in thread From: Stefan Beller @ 2017-06-27 3:15 UTC (permalink / raw) To: Gyandeep Singh, Johannes Schindelin; +Cc: git@vger.kernel.org I miss-read your email. So you are not running Git, but only talk about the (Git-)bash that is conveniently bundled with Git for Windows? For that I recommend https://github.com/git-for-windows/git/issues/new Johannes Schindelin the GfW maintainer is cc'd here as well, but AFAICT he prefers Github issues. On Mon, Jun 26, 2017 at 8:08 PM, Gyandeep Singh <gyandeeps@gmail.com> wrote: > Not sure what you mean by output. But its just goes back to normal like this > > Gyandeep@Gyandeep MINGW64 ~ > > $ > > > > It was working fine on first release of git 2.13. It broken with > releases after that. > > Will try with –no-pager flag and let you tomorrow. > > > > Thanks > > Gyandeep > Regards, > > Gyandeep Singh > Website: http://gyandeeps.com > > > On Mon, Jun 26, 2017 at 9:55 PM, Stefan Beller <sbeller@google.com> wrote: >> Which exact outputs of Git are invoked? >> >> Does it change when giving slightly different options e.g. --no-pager? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: Cannot kill Nodejs process using ctrl + c 2017-06-27 3:15 ` Stefan Beller @ 2017-06-27 3:17 ` Gyandeep Singh 0 siblings, 0 replies; 7+ messages in thread From: Gyandeep Singh @ 2017-06-27 3:17 UTC (permalink / raw) To: Stefan Beller; +Cc: Johannes Schindelin, git@vger.kernel.org Appreciate it. Thanks a lot. Regards, Gyandeep Singh Website: http://gyandeeps.com On Mon, Jun 26, 2017 at 10:15 PM, Stefan Beller <sbeller@google.com> wrote: > I miss-read your email. > > So you are not running Git, but only talk about the (Git-)bash that is > conveniently bundled with Git for Windows? > For that I recommend https://github.com/git-for-windows/git/issues/new > > Johannes Schindelin the GfW maintainer is cc'd here as well, but > AFAICT he prefers Github issues. > > On Mon, Jun 26, 2017 at 8:08 PM, Gyandeep Singh <gyandeeps@gmail.com> wrote: >> Not sure what you mean by output. But its just goes back to normal like this >> >> Gyandeep@Gyandeep MINGW64 ~ >> >> $ >> >> >> >> It was working fine on first release of git 2.13. It broken with >> releases after that. >> >> Will try with –no-pager flag and let you tomorrow. >> >> >> >> Thanks >> >> Gyandeep >> Regards, >> >> Gyandeep Singh >> Website: http://gyandeeps.com >> >> >> On Mon, Jun 26, 2017 at 9:55 PM, Stefan Beller <sbeller@google.com> wrote: >>> Which exact outputs of Git are invoked? >>> >>> Does it change when giving slightly different options e.g. --no-pager? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: Cannot kill Nodejs process using ctrl + c 2017-06-26 20:45 ` Bug: Cannot kill Nodejs process using ctrl + c Gyandeep Singh 2017-06-27 2:55 ` Stefan Beller @ 2017-06-28 14:40 ` Johannes Schindelin 2017-06-29 20:12 ` Johannes Schindelin 1 sibling, 1 reply; 7+ messages in thread From: Johannes Schindelin @ 2017-06-28 14:40 UTC (permalink / raw) To: Gyandeep Singh; +Cc: git Hi, On Mon, 26 Jun 2017, Gyandeep Singh wrote: > 3. hit "CTRL + c" (2 times) to kill the process. > 4. If you look at taskmanager, then you will see a node.js process > still running. or if you try to restart the server it will say port > 300 already in use. The way Ctrl+C is handled in Git for Windows changed recently, indeed. Remember: sending signals to processes to ask them to terminate is *POSIX* semantics. Not Windows semantics. On Windows you can terminate a process via the Win32 API. And I really mean "terminate". There is no chance for that process to, say, remove a now-stale .git/index.lock. We have to jump through hoops to accomodate Git's lack of non-POSIX understandings. In this particular case, we inject a remote thread into the process, running ExitProcess() so that the atexit() handlers have a chance to perform the cleanup that Git so cleverly expects to be able to do when being terminated. It is probably that thread that is still trying to run when you hit Ctrl+C the second time, and that second time it terminates *just* the shadow process: node.exe is a Console program, and since you run it in Git Bash (which does not have a Win32 Console, but emulates a Unix terminal instead) the node shell alias runs node.exe through a helper called winpty.exe that I suspect gets terminated without taking down its child processes. Ciao, Johannes ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Bug: Cannot kill Nodejs process using ctrl + c 2017-06-28 14:40 ` Johannes Schindelin @ 2017-06-29 20:12 ` Johannes Schindelin 0 siblings, 0 replies; 7+ messages in thread From: Johannes Schindelin @ 2017-06-29 20:12 UTC (permalink / raw) To: Gyandeep Singh; +Cc: git Hi, On Wed, 28 Jun 2017, Johannes Schindelin wrote: > On Mon, 26 Jun 2017, Gyandeep Singh wrote: > > [... a bug report ...] This bug report was reposted as https://github.com/git-for-windows/git/issues/1219 In my opinion, it is too Windows-specific for the discussion to continue anywhere but in that ticket. Ciao, Johannes ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-06-29 20:12 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <CAHaNChewK_4a7sPgZqWTNSmchiSbKOJUrpCrGLmcnR+cw6J5qw@mail.gmail.com> 2017-06-26 20:45 ` Bug: Cannot kill Nodejs process using ctrl + c Gyandeep Singh 2017-06-27 2:55 ` Stefan Beller 2017-06-27 3:08 ` Gyandeep Singh 2017-06-27 3:15 ` Stefan Beller 2017-06-27 3:17 ` Gyandeep Singh 2017-06-28 14:40 ` Johannes Schindelin 2017-06-29 20:12 ` Johannes Schindelin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).