Skip to content

strace shows "$include function ..." in .inputrc was not treated correctly #5

Open

Description

@Fedora7

On Ubuntu 20.04, complete log files of strace for python, lftp are attached.

cat .inputrc
$include function rl_custom_isearch /home/user2/git.local/test2/rl_custom_isearch/target/release/librl_custom_isearch.so
"\C-r": rl_custom_isearch

test command:
LD_PRELOAD=/home/user2/git.local/rl_custom_function/target/release/librl_custom_function.so strace -o /tmp/strace.python.txt 'python'

important log messages:
openat(AT_FDCWD, "/home/user2/git.local/rl_custom_function/target/release/librl_custom_function.so", O_RDONLY|O_CLOEXEC) = 3
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libreadline.so.8", O_RDONLY|O_CLOEXEC) = 3

openat(AT_FDCWD, "/home/user2/.inputrc", O_RDONLY) = 3

openat(AT_FDCWD, "function rl_custom_isearch /home/user2/git.local/test2/rl_custom_isearch/target/release/librl_custom_isearch.so", O_RDONLY) = -1 ENOENT (No such file or directory)

The last message showed the syntax of $include function ... in .inputrc was not treated correctly even librl_custom_function.so was preloaded. That caused the portion of "function ... " being loaded as a regular file name.

Any idea what cause the problem ? Thanks

strace.lftp.txt
strace.python.txt

Activity

  1. lincheney commented on Sep 16, 2022

    @lincheney
    Owner

    Honestly I have no clue, that looks very strange :(
    The way it works is it is meant to hijack rl_parse_and_bind but for whatever reason something is going wrong there with yours.
    If you are willing, perhaps you can try add some logging to https://github.com/lincheney/rl_custom_function/blob/master/src/lib.rs#L96 and see if what is happening?

  2. losnappas commented on May 6, 2023

    @losnappas

    Having the same problem. Any logs that would be helpful?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions