diff options
author | Kurtis Rader <krader@skepticism.us> | 2016-05-14 20:35:54 -0700 |
---|---|---|
committer | Kurtis Rader <krader@skepticism.us> | 2016-05-14 20:35:54 -0700 |
commit | ff1d651415a2752e82ec417294f9bdf8c234c10f (patch) | |
tree | f9dce0f5ad2d8a9d160f4090887b34a34fdefcf4 /src/proc.cpp | |
parent | 149e601743f2ad85df8a3bd0cc857bfd0387ef67 (diff) |
rename get_is_interactive and remove stupid test
I'm doing this as part of fixing issue #2980. The code for managing tty modes
and job control is a horrible mess. This is a very tiny step towards improving
the situation.
Diffstat (limited to 'src/proc.cpp')
-rw-r--r-- | src/proc.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/proc.cpp b/src/proc.cpp index 305be0df..2e370754 100644 --- a/src/proc.cpp +++ b/src/proc.cpp @@ -101,10 +101,11 @@ static int is_interactive = -1; static bool proc_had_barrier = false; -int get_is_interactive(void) { +bool shell_is_interactive(void) { ASSERT_IS_MAIN_THREAD(); - // is_interactive is initialized to -1; ensure someone has popped/pushed it before then. - assert(is_interactive >= 0); + // is_interactive is statically initialized to -1. Ensure it has been dynamically set + // before we're called. + assert(is_interactive != -1); return is_interactive > 0; } |