{"id":6321,"date":"2022-12-20T18:58:09","date_gmt":"2022-12-20T21:58:09","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/exit-mann\/"},"modified":"2022-12-20T18:58:09","modified_gmt":"2022-12-20T21:58:09","slug":"exit-mann","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/exit-mann\/","title":{"rendered":"exit (mann)"},"content":{"rendered":"<h1 align=\"center\">exit<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#EXAMPLE\">EXAMPLE<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#KEYWORDS\">KEYWORDS<\/a> <\/p>\n<hr>\n<p>______________________________________________________________________________<\/p>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">exit \u2212 End the application<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>exit<\/b> ?<i>returnCode<\/i>? ______________________________________________________________________________<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Terminate the process, returning <i>returnCode<\/i> to the system as the exit status. If <i>returnCode<\/i> is not specified then it defaults to 0.<\/p>\n<h2>EXAMPLE <a name=\"EXAMPLE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Since non-zero exit codes are usually interpreted as error cases by the calling process, the <b>exit<\/b> command is an important part of signaling that something fatal has gone wrong. This code fragment is useful in scripts to act as a general problem trap:<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">proc main {} { <br \/> # &#8230; put the real main code in here &#8230; <br \/> }<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">if {[catch {main} msg options]} { <br \/> puts stderr &#8220;unexpected script error: $msg&#8221; <br \/> if {[info exists env(DEBUG)]} { <br \/> puts stderr &#8220;&#8212;- BEGIN TRACE &#8212;-&#8221; <br \/> puts stderr [dict get $options -errorinfo] <br \/> puts stderr &#8220;&#8212;- END TRACE &#8212;-&#8221; <br \/> }<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\"># Reserve code 1 for &#8220;expected&#8221; error exits&#8230; <b><br \/> exit<\/b> 2 <br \/> }<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">exec(n)<\/p>\n<h2>KEYWORDS <a name=\"KEYWORDS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">abort, exit, process<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  exit \u2212 End the application <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3783,1],"tags":[2427,2635],"class_list":["post-6321","post","type-post","status-publish","format-standard","hentry","category-n-comandos-tcl-tk","category-sin-categoria","tag-exit","tag-mann"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6321","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=6321"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6321\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}