[Bug 36746] New: Allow 'quit' to take an exit code

Bug ID 36746
Summary Allow ‘quit’ to take an exit code
Product lldb
Version 6.0
Hardware PC
OS All
Status NEW
Severity enhancement
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter alblue@apple.com
CC llvm-bugs@lists.llvm.org

When running lldb, it is not possible to return an exit code from the process
using the 'quit' command:

(lldb) quit 1
$ echo $?
0

Note that a workaround is to directly call os._exit(1) (since sys.exit is
apparently caught by the interpreter to prevent accidental exiting)

(lldb) script os._exit(1)
$ echo $?
1

Raphael Isemann changed bug 36746

What | Removed | Added |

Comment # 3 on bug 36746 from Raphael Isemann

Fixed in r336824.