[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
large exit values (>255)
From: |
Mike Frysinger |
Subject: |
large exit values (>255) |
Date: |
Wed, 25 Feb 2009 13:20:50 -0500 |
User-agent: |
KMail/1.11.0 (Linux/2.6.28; KDE/4.2.0; x86_64; ; ) |
seems there's a way to get bash to report exit values greater than 255 ...
since it requires certain key presses, things in between <...> means a key
press rather than typing literally ...
$ true
$ echo '<enter>
<ctrl+c>
$ echo $?
128
$ echo '<enter>
<ctrl+c>
$ echo '<enter>
<ctrl+c>
$ echo $?
128
$ true
$ echo '<enter>
<ctrl+d>
$ echo $?
258
$ true
$ echo '<enter>
<ctrl+d>
$ echo '<enter>
<ctrl+c>
$ echo $?
386
that doesnt seem right to me :)
the first test seems fine, and older versions of bash would set 258 for the
second test (not sure if it's correct though), but the third test looks like a
regression (not clearing exit status completely somewhere ?).
-mike
signature.asc
Description: This is a digitally signed message part.
- large exit values (>255),
Mike Frysinger <=