{"thread":{"id":"4645","subject":"[Patch] trap: exit: invalid signal specification","startedAt":"2006-06-24T01:10:12Z","lastAt":"2006-06-25T14:33:12Z","messageCount":5,"participants":["S.Çağlar Onur","Junio C Hamano","Matthias Lederhofer"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"22399","messageId":"200606240410.18334.caglar@pardus.org.tr","threadId":"4645","inReplyTo":null,"subject":"[Patch] trap: exit: invalid signal specification","fromName":"S.Çağlar Onur","fromEmail":"caglar@pardus.org.tr","sentAt":"2006-06-24T01:10:12Z","receivedAt":"2006-06-24T01:10:12Z","isPatch":true,"sender":{"key":"caglar@pardus.org.tr","avatar":"https://gravatar.com/avatar/8d945a59802123beb4c9c49b6ec9b8bda6f6fab227bd4ac38fe929c1d12198a6?d=mp&s=160"},"body":"Hi;\n\nThis tiny patch is needed to solve\n\ncaglar@zangetsu ~ $ git-clone \n/usr/bin/git-clone: line 121: trap: exit: invalid signal specification\n\nerror under tr_TR.UTF-8 (and other Turkic locales). For these locales \nupper(i) != I .\n\nP.S: If needed please CC me, i'm not subscribed to list\n\nSigned-off-by: S.Çağlar Onur <caglar@pardus.org.tr>\n---\n\ndiff -ur git-1.4.0.orig/git-clone.sh git-1.4.0/git-clone.sh\n--- git-1.4.0.orig/git-clone.sh 2006-06-10 22:41:54.000000000 +0300\n+++ git-1.4.0/git-clone.sh      2006-06-24 03:54:49.000000000 +0300\n@@ -205,7 +205,7 @@\n [ -e \"$dir\" ] && echo \"$dir already exists.\" && usage\n mkdir -p \"$dir\" &&\n D=$(cd \"$dir\" && pwd) &&\n-trap 'err=$?; cd ..; rm -r \"$D\"; exit $err' 0\n+trap 'err=$?; cd ..; rm -r \"$D\"; EXIT $err' 0\n case \"$bare\" in\n yes)\n        GIT_DIR=\"$D\" ;;\n\n-- \nS.Çağlar Onur <caglar@pardus.org.tr>\nhttp://cekirdek.pardus.org.tr/~caglar/\n\nLinux is like living in a teepee. No Windows, no Gates and an Apache in house!\n"},{"id":"22414","messageId":"7vejxf5ktc.fsf@assigned-by-dhcp.cox.net","threadId":"4645","inReplyTo":"200606240410.18334.caglar@pardus.org.tr","subject":"Re: [Patch] trap: exit: invalid signal specification","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-24T02:50:07Z","receivedAt":"2006-06-24T02:50:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"> diff -ur git-1.4.0.orig/git-clone.sh git-1.4.0/git-clone.sh\n> --- git-1.4.0.orig/git-clone.sh 2006-06-10 22:41:54.000000000 +0300\n> +++ git-1.4.0/git-clone.sh      2006-06-24 03:54:49.000000000 +0300\n> @@ -205,7 +205,7 @@\n>  [ -e \"$dir\" ] && echo \"$dir already exists.\" && usage\n>  mkdir -p \"$dir\" &&\n>  D=$(cd \"$dir\" && pwd) &&\n> -trap 'err=$?; cd ..; rm -r \"$D\"; exit $err' 0\n> +trap 'err=$?; cd ..; rm -r \"$D\"; EXIT $err' 0\n>  case \"$bare\" in\n>  yes)\n\nI am not quite sure what to make out this...  Do you mean your\nshell does not like the command \"exit\" spelled in lowercase\nunder Turkic locale?\n"},{"id":"22446","messageId":"200606241555.03147.caglar@pardus.org.tr","threadId":"4645","inReplyTo":"7vejxf5ktc.fsf@assigned-by-dhcp.cox.net","subject":"Re: [Patch] trap: exit: invalid signal specification","fromName":"S.Çağlar Onur","fromEmail":"caglar@pardus.org.tr","sentAt":"2006-06-24T12:54:55Z","receivedAt":"2006-06-24T12:54:55Z","isPatch":true,"sender":{"key":"caglar@pardus.org.tr","avatar":"https://gravatar.com/avatar/8d945a59802123beb4c9c49b6ec9b8bda6f6fab227bd4ac38fe929c1d12198a6?d=mp&s=160"},"body":"Cumartesi 24 Haziran 2006 05:50 tarihinde, Junio C Hamano şunları yazmıştı: \n> I am not quite sure what to make out this...  Do you mean your\n> shell does not like the command \"exit\" spelled in lowercase\n> under Turkic locale?\n\nSorry to not clear enough previously, for Turkic locales (tr_TR, az_AZ etc.) \nupper(i) != I. More detailed analysis can be found at \nhttp://www.i18nguy.com/unicode/turkish-i18n.html, \"Why Applications Fail With \nThe Turkish Language\" section. This is the main reason of this problem. \n\nAccording to its man page signals defined with uppercase letters but also \ndifferent trap implementations may permit lowercase signal names as an \nextension. \n\nAs an example bash (v. 3.1.17) permits lowercase signal names but it converts \nthis lowercase signal names into uppercase ones while interpreting the \nscript. But for our \"Turkish has 4 letter \"I\"s\" problem this convert to \nuppercase one process fails but for bash invalid signal names not be \nconsidered a syntax error and do not cause the shell to abort. \n\nYours\n-- \nS.Çağlar Onur <caglar@pardus.org.tr>\nhttp://cekirdek.pardus.org.tr/~caglar/\n\nLinux is like living in a teepee. No Windows, no Gates and an Apache in house!\n"},{"id":"22456","messageId":"E1FuBS1-0006RF-O8@moooo.ath.cx","threadId":"4645","inReplyTo":"200606241555.03147.caglar@pardus.org.tr","subject":"Re: [Patch] trap: exit: invalid signal specification","fromName":"Matthias Lederhofer","fromEmail":"matled@gmx.net","sentAt":"2006-06-24T16:57:41Z","receivedAt":"2006-06-24T16:57:41Z","isPatch":true,"sender":{"key":"matled@gmx.net","avatar":null},"body":"> As an example bash (v. 3.1.17) permits lowercase signal names but it converts \n> this lowercase signal names into uppercase ones while interpreting the \n> script. But for our \"Turkish has 4 letter \"I\"s\" problem this convert to \n> uppercase one process fails but for bash invalid signal names not be \n> considered a syntax error and do not cause the shell to abort. \n\nIt is ``trap <action> <signal>'' so for the signal part this may be\nright that this is made uppercase. But action is not modified I guess.\nSo it should be exit because there is no built-in named EXIT in\nbash:\n\n$ type exit\nexit is a shell builtin\n$ type EXIT\nbash: type: EXIT: not found\n\nSo for me it does not seem to work:\n\n$ trap 'err=$?; echo trap; EXIT $?' 0\n$ exit 5\nexit\ntrap\nbash: EXIT: command not found\n[1]    12906 exit 5     bash\n"},{"id":"22563","messageId":"200606251733.16502.caglar@pardus.org.tr","threadId":"4645","inReplyTo":"f36b08ee0606241311h399c42b0h11638f14d6f54bd5@mail.gmail.com","subject":"Re: [Patch] trap: exit: invalid signal specification","fromName":"S.Çağlar Onur","fromEmail":"caglar@pardus.org.tr","sentAt":"2006-06-25T14:33:12Z","receivedAt":"2006-06-25T14:33:12Z","isPatch":true,"sender":{"key":"caglar@pardus.org.tr","avatar":"https://gravatar.com/avatar/8d945a59802123beb4c9c49b6ec9b8bda6f6fab227bd4ac38fe929c1d12198a6?d=mp&s=160"},"body":"Cumartesi 24 Haziran 2006 23:11 tarihinde şunları yazmıştınız:\n> But in the commandline you are patching,  'exit' keyword\n> is not bash signal name, \n\nPff, you are completely right. I'm currently using git-1.2.6 which has \"exit\" \nsignal (git-clone.sh: trap 'err=$?; cd ..; rm -r \"$D\"; exit $err' exit ) \ncausing that trouble but in git-1.4.0 its converted to 0 (git-clone.sh: \ntrap 'err=$?; cd ..; rm -r \"$D\"; exit $err' 0) and i didn't realize until \nlook again. Sorry for noise :(\n\n-- \nS.Çağlar Onur <caglar@pardus.org.tr>\nhttp://cekirdek.pardus.org.tr/~caglar/\n\nLinux is like living in a teepee. No Windows, no Gates and an Apache in house!\n"}]}