Giter Site home page Giter Site logo

Comments (5)

slicer69 avatar slicer69 commented on August 16, 2024

Which shell are you using? On my FreeBSD machine with the default shell (tcsh) that line will give the error "ls 2: no such file or directory".

If I switch to bash and run "doas ls 2> /dev/null" then I get a directory listing as expected.

from doas.

abakay avatar abakay commented on August 16, 2024

I tried that command in sh and fish shells.

It is looks like in tcsh is not possible to redirect stderr separately from stdout. From man tcsh:

Diagnostic output may be directed through a pipe with the standard output. Simply use the form |& rather than just |.

The shell cannot presently redirect diagnostic output without also redirecting standard output, but (command > output-file) >& error-file is often an acceptable workaround. Either output-file or error-file may be /dev/tty to send out-put to the terminal.

from doas.

slicer69 avatar slicer69 commented on August 16, 2024

I just checked with plain sh (/binsh) on FreeBSD 12.2 and running "doas ls 2> /dev/null" displays a normal directory listing.

from doas.

abakay avatar abakay commented on August 16, 2024

Ok, I guess I spotted one more difference. I am using pam_ssh_agent_auth package on this machine with following PAM configuration:

auth            sufficient      /usr/local/lib/pam_ssh_agent_auth.so file=~/.ssh/authorized_keys
auth            required        pam_deny.so
account         include         system
session         required        pam_permit.so

Maybe that somehow is contributing to the issue.

from doas.

slicer69 avatar slicer69 commented on August 16, 2024

Perhaps. I can say that with the default configuration output isn't being redirected so the command you suggested prints output as expected.

from doas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.