Git Product home page Git Product logo

Comments (7)

jernejs avatar jernejs commented on May 16, 2024 6

/dev/null should be a character device with major 1 and minor 3, but it isn't in lxss, so tests like this fail:

[ -c /dev/null ] || echo broken

from wsl.

jpyper avatar jpyper commented on May 16, 2024

Maybe the whole idea behind the Linux/Ubuntu subsystem hasn't been fully implemented yet. The UNIX philosophy is that EVERYTHING is a file. For example, /dev/null is a virtual device file. This means that nothing, is something, and that something is represented in userland as a file.

On my Debian system, I get the following:

john@phobos:~$ stat /dev/null
File: '/dev/null'
Size: 0 Blocks: 0 IO Block: 4096 character special file
Device: 6h/6d Inode: 1037 Links: 1 Device type: 1,3
Access: (0666/crw-rw-rw-) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2016-04-06 20:33:12.884276144 -0700
Modify: 2016-04-06 20:33:12.884276144 -0700
Change: 2016-04-06 20:33:12.884276144 -0700
Birth: -

It looks like the Ubuntu subsystem doesn't see /dev/null as a "character special file" which I would think would redirect to >NUL on Windows.

from wsl.

poizan42 avatar poizan42 commented on May 16, 2024

Shouldn't it be fine if /dev/null was simply a symlink to \Device\Null?

from wsl.

thanosk avatar thanosk commented on May 16, 2024

One side-effect of this breaks sshd (openssh-server), as also mentioned here: MicrosoftDocs/WSL#17

from wsl.

russalex avatar russalex commented on May 16, 2024

The weird file is a known issue and something we intend to fix. It is currently on our backlog.

from wsl.

mjgardner avatar mjgardner commented on May 16, 2024

Another side-effect: I can't build a different version of Perl, either manually or using the perlbrew package, because its configure script checks for /dev/null's usability.

from wsl.

 avatar commented on May 16, 2024

anybody want to take a guess at why this is in all of the binaries? https://gist.github.com/cloudkitsch/6f8bcb05f4006b5ea168eb6169ecbf12#file-gistfile1-txt-L335 quality control?

from wsl.

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.