The problem was introduced, IIRC, in MS-DOS.
The problem was introduced, IIRC, in MS-DOS.
This does bring back fond memories. In the early days of Windows 1.x, the way to get debug/log output was with the OutputDebugString() function. This wrote the output to the AUX device, which would be a serial terminal or printer. I didn't have one of those, but did have the IBM Monochrome display sitting idle while Windows ran on the CGA or EGA display.
So I wrote a little DOS driver called AUX.SYS (with source code in AUX.ASM) to redirect AUX output to the Monochrome display.
That did not work very well! I couldn't even edit my source file.
After a while I figured out the problem and renamed the driver to OX.SYS and OX.ASM for the source. Homophones to the rescue!
https://github.com/geary/OX.SYS
And as usual, Raymond Chen has some insights on why these special filenames "worked" regardless of file extension or directory location:
https://devblogs.microsoft.com/oldnewthing/20031022-00/?p=42...
I have no idea whether it works in FreeDOS, and I don't have a monochrome display to test it on. But if you try it, I would be very curious to know if it works! (You can reply to this message and I will get notified.)
only after the last 32-bit version of Windows 10 goes out of support will some of these things begin to get fixed. and even then it will not be a priority.
With no logging... But invariably, they would not want log files created in their production environment...
So, we would add at least an OutputDebugString() to the catch... prepare a build - then in the production environment we would use the Sysinternals "DebugView" to find out why things were breaking... (And typically - it was a missing dependency or DLL version miss-match from dev to production)
Fun times.
The basename (without the extension) had certain reserved names such as CON, PRN, AUX, PTR, PUN, etc. Originally these names always had a trailing colon to identify them as devices, but MS/DOS dropped that. MS/DOS kept the trailing colons for disk drive identification, but not much else.
This capability could be used to make a batch files (.BAT) without any editor on the system. One could type: COPY CON RUNME.BAT, and then type in the wanted lines of the batch file. The end-of-file character (^Z 0x1A) was the same on CP/M and DOS, unlike (^D 0x04) on Unix.
https://gordonbell.azurewebsites.net/Digital/RT-11%20System%...
coughs in Unix
You can even get it using the Unix path slashes in the 2.11 source code.
You either have persistent files with special attributes that identify it as a device, or you namespace your devices with characters that cannot be used in a file name. But you don't allow your devices to be valid file names and have them invisible on the file system.
I never thought about it, but when you consider ‘:’ as the device suffix, this makes directory structures make more sense to me on Windows.
C:\foo\bar makes more sense to me if it is the ‘C:’ device. Calling it a ‘C drive’ with a separate namespace never made sense to me. Somehow thinking of it the ‘C:’ device in an anonymous global hierarchy makes more sense to me.
You'll still be able to create named pipes (mkfifo), but mknod will fail.
This is handy for filesystems with a poorly developed sense of user ownership and permissions, say, msdos or vfat.
I tend to mount my /tmp space nodev and nosuid, as occasionally you'll find poorly-written, or nefariously-intended programs attempting to do such things there.
(udev assumes they live under /dev. I'm not sure if /dev is hardcoded in udev or configurable. But you don't have to use udev anyway, you can create device nodes manually.)
So there's actually a good reason for being able to create device nodes outside /dev.
As for why default to uppercase instead of lower case, I think just a matter of style. Unix and C favour lower case, FORTRAN and COBOL and your keyboard keycaps favour upper case.
probably to make sensible use of limited display abilities of early hardware, fitting characters in 8x8 boxes and making it readable on blurry fat beam glowing green screens quickly becomes a problem with lowercase (size, readability, ascenders, descenders, baseline), whereas uppercase is comparatively easy.
but why uppercase rather than lowercase, you might ask? well, http://wiki.c2.com/?CapitalizingGod has the following story, but i don't know if it is correct.
We may remember that ancient teletypes, printers, and terminals would bang out their output in all upper case. When this technology was first being standardized, the researchers did usability studies and found that people read lowercase text more easily than uppercase. But management decided to use uppercase instead. The reason? If only lowercase was shown, then there would be no means for CapitalizingGod.
anyway, by the time people started putting screens and pixels on computers in the 01960s to 01980s, the uppercase-only tradition was very well established.