github github
  • Home
  • Pricing and Signup
  • Training
  • Gist
  • Blog
  • Login

symfony / symfony

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
    • 1,061
    • 191
  • Source
  • Commits
  • Network
  • Pull Requests (3)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Graph
  • Members

tvlooy wants someone to pull 1 commit into symfony:master from tvlooy:master

  • Discussion
  • Commits 1
  • Files Changed 1
  • Reply

Showing 0 comments with 1 commit and 0 commit comments

#19 Closed

status codes

tvlooy — Tue Oct 12 04:02:30 -0700 2010

if you return a status code bigger than 255, bash will see it as status code 0. Proof:
$ php -r "exit(255);" ; echo $? 255
$ php -r "exit(256);" ; echo $? 0

This is also in the bash manpage in the section "EXIT STATUS". This fix makes sure an error code stays an error code, so we can check for it. I noticed this because Doctrine 2.0 migrations threw a PDO exception and tried to exit with code 23000. This became an exit(0) and our buildsystem did a thumbs up. Obviously not ok :-)

Tom Van Looy added some commits

Tue Oct 12 03:57:22 -0700 2010

1faee62 fix status code

Comment on this pull request

You must be logged in to comment on pull requests.

Active Participants

  • tvlooy

Showing 1 unique commit by 1 author.

1faee628 Tom Van Looy fix status code Tue Oct 12 03:57:22 -0700 2010

Showing 1 changed files with 3 additions and 0 deletions.

M src/Symfony/Component/Console/Application.php 3 •••
Txt src/Symfony/Component/Console/Application.php
  • View file @ 1faee62
... ...
@@ -123,6 +123,9 @@ class Application
123 123
         }
124 124
 
125 125
         if ($this->autoExit) {
  126
+            if ($statusCode > 255) {
  127
+                $statusCode = 255;
  128
+            }
126 129
             // @codeCoverageIgnoreStart
127 130
             exit($statusCode);
128 131
             // @codeCoverageIgnoreEnd
Dedicated Server Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
  • Blog
  • Support
  • Training
  • Job Board
  • Shop
  • Contact
  • API
  • Status
  • © 2010 GitHub Inc. All rights reserved.
  • Terms of Service
  • Privacy
  • Security
  • Deutsch
  • English
  • Français
  • 日本語
  • Português (BR)
  • Русский
  • 中文
  • See all available languages

Your current locale selection: Deutsch. Choose another?

  • English
  • Afrikaans
  • Català
  • Čeština
  • Deutsch
  • Español
  • Français
  • Hrvatski
  • Indonesia
  • Italiano
  • 日本語
  • Nederlands
  • Norsk
  • Polski
  • Português (BR)
  • Русский
  • Српски
  • Svenska
  • 中文

Keyboard Shortcuts

Site wide shortcuts

s
Focus site search
?
Bring up this help dialog

Commit list

j
Move selected down
k
Move selected up
t
Open tree
p
Open parent
c or o or enter
Open commit

Pull request list

j
Move selected down
k
Move selected up
o or enter
Open issue

Issues

j
Move selected down
k
Move selected up
x
Toggle select target
o or enter
Open issue
I
Mark selected as read
U
Mark selected as unread
e
Close selected
y
Remove selected from view
c
Create issue
l
Create label
i
Back to inbox
u
Back to issues
/
Focus issues search

Network Graph

← or h
Scroll left
→ or l
Scroll right
↑ or k
Scroll up
↓ or j
Scroll down
t
Toggle visibility of head labels
shift ← or shift h
Scroll all the way left
shift → or shift l
Scroll all the way right
shift ↑ or shift k
Scroll all the way up
shift ↓ or shift j
Scroll all the way down