{"thread":{"id":"11957","subject":"[PATCH] git help -w should not create nohup.out","startedAt":"2008-02-08T01:33:41Z","lastAt":"2008-02-10T02:06:54Z","messageCount":11,"participants":["Dmitry Potapov","Johannes Schindelin","Junio C Hamano","Christian Couder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"67881","messageId":"1202434421-8066-1-git-send-email-dpotapov@gmail.com","threadId":"11957","inReplyTo":null,"subject":"[PATCH] git help -w should not create nohup.out","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2008-02-08T01:33:41Z","receivedAt":"2008-02-08T01:33:41Z","isPatch":true,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"git-help--browse uses 'nohup' to launch some browsers. If the output is not\nredirected, 'nohup' creates 'nohup.out' and prints a warning about that. It\nwas mighty annoying to see this warning as well as to have empty nohup.out\nfiles scattered everywhere you happened to use 'git help -w'.\n\nThis patch redirects the output to /dev/null when a GUI browser is launched\nusing the 'nohup' command; thus 'nohup.out' is not created.\n\nSigned-off-by: Dmitry Potapov <dpotapov@gmail.com>\n---\n\nInitially I thought to redict the output to $HOME/.git-nohup.out instead of\n/dev/null, so no output will be lost if an error happen. But the only error\nthat a GUI browser may want to report to the stderr or stdout is a problem\ninside Xlib (like connection to X display or something like that), and when\nit happens you cannot run your favorite browser from the command line anyway.\nSo, it is very noticeably and no problem to diagnose without any nohup.out\ncreated by git help.\n\n git-help--browse.sh |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/git-help--browse.sh b/git-help--browse.sh\nindex 10b0a36..320e836 100755\n--- a/git-help--browse.sh\n+++ b/git-help--browse.sh\n@@ -122,7 +122,7 @@ case \"$browser\" in\n \tvers=$(expr \"$($browser_path -version)\" : '.* \\([0-9][0-9]*\\)\\..*')\n \tNEWTAB='-new-tab'\n \ttest \"$vers\" -lt 2 && NEWTAB=''\n-\tnohup \"$browser_path\" $NEWTAB $pages &\n+\tnohup \"$browser_path\" $NEWTAB $pages > /dev/null &\n \t;;\n     konqueror)\n \tcase \"$(basename \"$browser_path\")\" in\n@@ -136,7 +136,7 @@ case \"$browser\" in\n \t\teval \"$browser_path\" newTab $pages\n \t\t;;\n \t    *)\n-\t        nohup \"$browser_path\" $pages &\n+\t        nohup \"$browser_path\" $pages > /dev/null &\n \t\t;;\n \tesac\n \t;;\n@@ -144,6 +144,6 @@ case \"$browser\" in\n \teval \"$browser_path\" $pages\n \t;;\n     dillo)\n-\tnohup \"$browser_path\" $pages &\n+\tnohup \"$browser_path\" $pages > /dev/null &\n \t;;\n esac\n-- \n1.5.4\n"},{"id":"67883","messageId":"alpine.LSU.1.00.0802080153570.11591@racer.site","threadId":"11957","inReplyTo":"1202434421-8066-1-git-send-email-dpotapov@gmail.com","subject":"Re: [PATCH] git help -w should not create nohup.out","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-08T01:55:33Z","receivedAt":"2008-02-08T01:55:33Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 8 Feb 2008, Dmitry Potapov wrote:\n\n> git-help--browse uses 'nohup' to launch some browsers.\n\nWhy?\n\n\"nohup\" should be used to start a program that should persist even after \nyou logged out.  I fail to see how this should be sensible for \"git help \n-w\".  So \"off with the head\", uh, do away with the \"nohup\", I say!\n\nCiao,\nDscho\n"},{"id":"67887","messageId":"7vhcgkm7yy.fsf@gitster.siamese.dyndns.org","threadId":"11957","inReplyTo":"alpine.LSU.1.00.0802080153570.11591@racer.site","subject":"Re: [PATCH] git help -w should not create nohup.out","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-08T03:40:21Z","receivedAt":"2008-02-08T03:40:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi,\n>\n> On Fri, 8 Feb 2008, Dmitry Potapov wrote:\n>\n>> git-help--browse uses 'nohup' to launch some browsers.\n>\n> Why?\n>\n> \"nohup\" should be used to start a program that should persist even after \n> you logged out.  I fail to see how this should be sensible for \"git help \n> -w\".  So \"off with the head\", uh, do away with the \"nohup\", I say!\n\nTrue.  Christian, what was the reason you added nohup?\nI would imagine if you did this:\n\n\t(1) open a new xterm;\n\n        (2) in that xterm, run the browser, perhaps from\n            git-help--browse, but without nohup, in the\n            background;\n\n\t(3) exit the terminal\n\nthen the browser might get upset, losing its controlling\nterminal.\n\nBut I suspect that would be a really broken behaviour.\n"},{"id":"67897","messageId":"200802080637.04015.chriscool@tuxfamily.org","threadId":"11957","inReplyTo":"7vhcgkm7yy.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] git help -w should not create nohup.out","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2008-02-08T05:37:03Z","receivedAt":"2008-02-08T05:37:03Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Le vendredi 8 février 2008, Junio C Hamano a écrit :\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> > Hi,\n> >\n> > On Fri, 8 Feb 2008, Dmitry Potapov wrote:\n> >> git-help--browse uses 'nohup' to launch some browsers.\n> >\n> > Why?\n> >\n> > \"nohup\" should be used to start a program that should persist even\n> > after you logged out.  I fail to see how this should be sensible for\n> > \"git help -w\".  So \"off with the head\", uh, do away with the \"nohup\", I\n> > say!\n>\n> True.  Christian, what was the reason you added nohup?\n\nI think I was worried about something like this:\n\n1) ssh -Y other_machine\n2) git help -w, it opens my browser\n3) open many other tabs in the browser\n4) exit other_machine, oops my browser with all my tabs is gone\n\nor\n\n1) open my favorite browser and many tabs in it\n2) ssh -Y other_machine\n3) git help -w, cool it opens a tab in my already opened browser in 1)\n4) exit other_machine, oops my browser with all my tabs is gone\n\nI thought it would perhaps help, and it was better to be on the safe side. \nBut I just tested a little and it seems it doesn't change anything.\n\nAlso there are some browser that are very verbose on the SDTOUT or STDERR \n(especially konqueror) and I thought the nohup would also help move the \noutput out of the command line while not discarding it in case it's needed. \nBut I agree that it's not very often usefull and anyway there are better \nways to deal with it.\n\nSo no problem to do away with the \"nohup\".\n\nThanks,\nChristian.\n"},{"id":"67925","messageId":"20080208103307.GT30368@dpotapov.dyndns.org","threadId":"11957","inReplyTo":"7vhcgkm7yy.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] git help -w should not create nohup.out","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2008-02-08T10:33:07Z","receivedAt":"2008-02-08T10:33:07Z","isPatch":true,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Thu, Feb 07, 2008 at 07:40:21PM -0800, Junio C Hamano wrote:\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > Hi,\n> >\n> > On Fri, 8 Feb 2008, Dmitry Potapov wrote:\n> >\n> >> git-help--browse uses 'nohup' to launch some browsers.\n> >\n> > Why?\n> >\n> > \"nohup\" should be used to start a program that should persist even after \n> > you logged out.  I fail to see how this should be sensible for \"git help \n> > -w\".  So \"off with the head\", uh, do away with the \"nohup\", I say!\n> \n> True.  Christian, what was the reason you added nohup?\n> I would imagine if you did this:\n> \n> \t(1) open a new xterm;\n> \n>         (2) in that xterm, run the browser, perhaps from\n>             git-help--browse, but without nohup, in the\n>             background;\n> \n> \t(3) exit the terminal\n> \n> then the browser might get upset, losing its controlling\n> terminal.\n\nI also thought so, therefore, I suggested to redict the output to\n/dev/null instead of removing \"nohup\", but now after some testing,\nit seems there is no need for \"nohup\" here. So, unless Christian\nhas a good reason for \"nohup\", I agree with Johannes that \"nohup\"\nshould be removed.\n\n\nDmitry\n"},{"id":"67931","messageId":"20080208112543.GV30368@dpotapov.dyndns.org","threadId":"11957","inReplyTo":"200802080637.04015.chriscool@tuxfamily.org","subject":"Re: [PATCH] git help -w should not create nohup.out","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2008-02-08T11:25:43Z","receivedAt":"2008-02-08T11:25:43Z","isPatch":true,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Fri, Feb 08, 2008 at 06:37:03AM +0100, Christian Couder wrote:\n> \n> I think I was worried about something like this:\n> \n> 1) ssh -Y other_machine\n> 2) git help -w, it opens my browser\n> 3) open many other tabs in the browser\n> 4) exit other_machine, oops my browser with all my tabs is gone\n\nIt seems to me that the browser will be killed anyway if ssh connection\nis closed. At least, that what happened when I used ssh -Y localhost. In\nfact, \"nohup\" made only easier to kill the browser in this way:\nssh -Y localhost\ngit help -w\nexit\nCTRL-C\n\nWithout \"nohup\" CTRL-C had no effect, but when I started the browser\nwith nohup then the connection would be closed and the browser killed.\n\n\nDmitry\n"},{"id":"67995","messageId":"1202502982-6822-1-git-send-email-dpotapov@gmail.com","threadId":"11957","inReplyTo":"7vhcgkm7yy.fsf@gitster.siamese.dyndns.org","subject":"[PATCH] remove \"nohup\" from git-help--browse","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2008-02-08T20:36:22Z","receivedAt":"2008-02-08T20:36:22Z","isPatch":true,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"There is no good reason to run GUI browsers using \"nohup\". It does not\nsolve any real problem but creates annoying \"nohup.out\" files in every\ndirectory where git help -w is run.\n\nThis patch removes \"nohup\" from git-help--browse.sh\n\nSigned-off-by: Dmitry Potapov <dpotapov@gmail.com>\n---\nIt seems that everyone is agree that there is no good reason to\nkeep \"nohup\" in git-help--browse. So here is the patch.\n\n git-help--browse.sh |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/git-help--browse.sh b/git-help--browse.sh\nindex 10b0a36..adc4d37 100755\n--- a/git-help--browse.sh\n+++ b/git-help--browse.sh\n@@ -122,7 +122,7 @@ case \"$browser\" in\n \tvers=$(expr \"$($browser_path -version)\" : '.* \\([0-9][0-9]*\\)\\..*')\n \tNEWTAB='-new-tab'\n \ttest \"$vers\" -lt 2 && NEWTAB=''\n-\tnohup \"$browser_path\" $NEWTAB $pages &\n+\t\"$browser_path\" $NEWTAB $pages &\n \t;;\n     konqueror)\n \tcase \"$(basename \"$browser_path\")\" in\n@@ -136,7 +136,7 @@ case \"$browser\" in\n \t\teval \"$browser_path\" newTab $pages\n \t\t;;\n \t    *)\n-\t        nohup \"$browser_path\" $pages &\n+\t        \"$browser_path\" $pages &\n \t\t;;\n \tesac\n \t;;\n@@ -144,6 +144,6 @@ case \"$browser\" in\n \teval \"$browser_path\" $pages\n \t;;\n     dillo)\n-\tnohup \"$browser_path\" $pages &\n+\t\"$browser_path\" $pages &\n \t;;\n esac\n-- \n1.5.4\n"},{"id":"68052","messageId":"200802090653.43280.chriscool@tuxfamily.org","threadId":"11957","inReplyTo":"1202502982-6822-1-git-send-email-dpotapov@gmail.com","subject":"Re: [PATCH] remove \"nohup\" from git-help--browse","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2008-02-09T05:53:43Z","receivedAt":"2008-02-09T05:53:43Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Le vendredi 8 février 2008, Dmitry Potapov a écrit :\n> There is no good reason to run GUI browsers using \"nohup\". It does not\n> solve any real problem but creates annoying \"nohup.out\" files in every\n> directory where git help -w is run.\n\nThat's right, but if you just remove \"nohup\", then there may be some \nannoying browser output on the terminal. Perhaps we should also redirect \nstderr and stdout to /dev/null.\n\n> This patch removes \"nohup\" from git-help--browse.sh\n\n\"git-help--browse.sh\" has been renamed \"git-web--browse.sh\" in next so we \nneed a similar patch for next.\n\nThanks,\nChristian. \n"},{"id":"68113","messageId":"20080209200351.GC30368@dpotapov.dyndns.org","threadId":"11957","inReplyTo":"200802090653.43280.chriscool@tuxfamily.org","subject":"Re: [PATCH] remove \"nohup\" from git-help--browse","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2008-02-09T20:03:51Z","receivedAt":"2008-02-09T20:03:51Z","isPatch":true,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Sat, Feb 09, 2008 at 06:53:43AM +0100, Christian Couder wrote:\n> Le vendredi 8 février 2008, Dmitry Potapov a écrit :\n> > There is no good reason to run GUI browsers using \"nohup\". It does not\n> > solve any real problem but creates annoying \"nohup.out\" files in every\n> > directory where git help -w is run.\n> \n> That's right, but if you just remove \"nohup\", then there may be some \n> annoying browser output on the terminal. Perhaps we should also redirect \n> stderr and stdout to /dev/null.\n\nI don't mind this redirection, but I am not sure whether it is the right\nthing to do, because it may hide relevant error information, and if your\nbrowser tends to print irrelevant and annoying messages at start, then\nperhaps the script to start this browser should be corrected to suppress\nthese output.\n\nSo, I want to hear what other people think. If there is no objection,\nI will add this redirection.\n\n> \n> > This patch removes \"nohup\" from git-help--browse.sh\n> \n> \"git-help--browse.sh\" has been renamed \"git-web--browse.sh\" in next so we \n> need a similar patch for next.\n\nOkay, I will base my patch on next.\n\n\nDmitry\n"},{"id":"68146","messageId":"7vbq6p7emn.fsf@gitster.siamese.dyndns.org","threadId":"11957","inReplyTo":"20080209200351.GC30368@dpotapov.dyndns.org","subject":"Re: [PATCH] remove \"nohup\" from git-help--browse","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-02-10T02:02:24Z","receivedAt":"2008-02-10T02:02:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dmitry Potapov <dpotapov@gmail.com> writes:\n\n> So, I want to hear what other people think. If there is no objection,\n> I will add this redirection.\n\nI personally feel that we should not hide output from the\nbackend browsers by redirection.  Some may be chattier than\nothers, but then we would know against which browser to file bug\nreports.\n\nJust my two yen.\n"},{"id":"68147","messageId":"alpine.LSU.1.00.0802100205440.11591@racer.site","threadId":"11957","inReplyTo":"7vbq6p7emn.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] remove \"nohup\" from git-help--browse","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-02-10T02:06:54Z","receivedAt":"2008-02-10T02:06:54Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 9 Feb 2008, Junio C Hamano wrote:\n\n> Dmitry Potapov <dpotapov@gmail.com> writes:\n> \n> > So, I want to hear what other people think. If there is no objection,\n> > I will add this redirection.\n> \n> I personally feel that we should not hide output from the\n> backend browsers by redirection.  Some may be chattier than\n> others, but then we would know against which browser to file bug\n> reports.\n> \n> Just my two yen.\n\nYeah.  If you do not like the chatty side, then there should be a way to \nconfigure a script which redirects stdout/stderr to be called in place of \nthe browser binary.\n\nJust my two (rapidly losing) pound.\n\nCiao,\nDscho\n"}]}