|
From: | Alex Gaynor |
Subject: | Re: [Bug-readline] readline + shell redirection + fish hangs |
Date: | Fri, 21 Apr 2017 12:32:05 -0400 |
AlexThanks,Thanks, let me know if there's anything additional I can do to help debug.I have not gotten further than this. It was a tossup between filing as a fish bug and a readline bug, the fact that libEdit works was what caused me to file this as a readline bug.Grabbing the process with lldb, shows it is hung in the following place:It similarly works fine under bash.This works fine with the libEdit provided by macOS:<hangs here>Ok, now to reproduce the bug:readline 7.0.3, install with homebrewInitial diagnostic info:Hi Readline Maintainers!This email describes a bug that occurs when readline is used in combination with the fish shell.
macOS 10.12.4
Darwin agaynor-44227 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar 3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64
fish, version 2.5.0
~ ❯❯❯ cat t.c
#include <readline/readline.h>
int main() {
rl_initialize();
return 0;
}
~ ❯❯❯ # Use the readline from homebrew, rather than the system one
~ ❯❯❯ clang -L /usr/local/opt/readline/lib/ -lreadline t.c
~ ❯❯❯ ./a.out | grep hi
~ ❯❯❯ clang -lreadline t.c
~ ❯❯❯ ./a.out | grep hi
~ ❯❯❯
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x00007fffa48b55ee libsystem_kernel.dylib`__ioctl + 10
frame #1: 0x00007fffa48b1569 libsystem_kernel.dylib`ioctl + 159
frame #2: 0x000000010eb7a362 libreadline.7.dylib`get_tty_settings + 54
frame #3: 0x000000010eb7a584 libreadline.7.dylib`rltty_set_default_bindings + 57
frame #4: 0x000000010eb74a79 libreadline.7.dylib`rl_initialize + 200
frame #5: 0x000000010eb6ff84 a.out`main + 20
frame #6: 0x00007fffa4787235 libdyld.dylib`start + 1
frame #7: 0x00007fffa4787235 libdyld.dylib`start + 1
[Prev in Thread] | Current Thread | [Next in Thread] |