is that if fifo or if nonormal file ..
.. is that another story from history .. ?
that it doesnt accept them ..

On Fri, Feb 14, 2025, 1:36 PM Greg Wooledge <g...@wooledge.org> wrote:

> On Fri, Feb 14, 2025 at 05:19:48 -0600, MacBeth wrote:
> > On Fri, Feb 14, 2025 at 4:31 AM MacBeth <macbeth.112...@gmail.com>
> wrote:
> > > # fails:
> > > $ history -r <(echo 'echo bad')
> >
> > Unless the reason is due to the file seek issue as described here...?
> > https://unix.stackexchange.com/a/164109
>
> hobbit:~$ echo ': testing file y' > y
> hobbit:~$ strace bash -c 'history -r y'
> [...]
> openat(AT_FDCWD, "y", O_RDONLY)         = 3
> newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=17, ...}, AT_EMPTY_PATH)
> = 0
> read(3, ": testing file y\n", 17)       = 17
> close(3)                                = 0
> [...]
>
> hobbit:~$ strace bash -c 'history -r <(echo ": testing procsub")'
> [...]
> openat(AT_FDCWD, "/dev/fd/63", O_RDONLY) = 3
> newfstatat(3, "", {st_mode=S_IFIFO|0600, st_size=0, ...}, AT_EMPTY_PATH) =
> 0
> close(3)                                = 0
> close(63)                               = 0
> [...]
>
> Looks like it never even tries to read the bytes from the procsub.  It
> checks the file's type, sees S_IFIFO, and silently ignores it.
>
> You'd think it would at least give a warning.
>
>

Reply via email to