Post Aa01UXAcPnLXQK1nAO by lanodan@queer.hacktivis.me
(DIR) More posts by lanodan@queer.hacktivis.me
(DIR) Post #AZzQ02tCjn1UW9TuQi by fgaz@cdrom.tokyo
2023-09-21T10:54:01.183449Z
19 likes, 25 repeats
I somehow managed to accidentally delete /dev/null and it’s unbelievable how much stuff relies on writing data to nothing.SSH just doesn’t startsame with tmuxbash completion doesn’t work and spams errors about _upvarsI can’t open GUI programs unless I launch them from a terminal that was opened when /dev/null was still thereFirefox prints assertion failures, then the error handler segfaults (!!)
(DIR) Post #AZzQrbawQyh7VDTiXA by duponin@udongein.xyz
2023-09-21T11:04:30.290728Z
5 likes, 0 repeats
@fgaz howhaveyoudeleted /dev/null:wat: :what_cirno: :what:
(DIR) Post #AZzRjjXn5yFbnHoaYK by fgaz@cdrom.tokyo
2023-09-21T11:10:56.258654Z
1 likes, 0 repeats
@duponin Apparently, when told to write to an existing file, some programs don’t write over that file, but instead choose to remove and replace it :blobcatgooglyshrug:
(DIR) Post #AZzRjkRRl2loZtr2Iq by duponin@udongein.xyz
2023-09-21T11:14:16.182456Z
0 likes, 0 repeats
@fgaz lm fucking aokernel skill issue moment
(DIR) Post #AZzXPb9JCHLvgu95DE by lanodan@queer.hacktivis.me
2023-09-21T12:16:41.371144Z
2 likes, 0 repeats
@duponin @fgaz Well /dev/null is a regular file, because the only actual virtual filesystem linux has is /proc
(DIR) Post #AZzXUSuBH8h9ZROGYq by fgaz@cdrom.tokyo
2023-09-21T11:07:21.236930Z
1 likes, 0 repeats
Like… I know it’s required by POSIX, and it’s helpful in scripts, but how is it possible that standalone programs rely on it instead of just… not producing that data.Just how much data gets produced and the immediately thrown away into /dev/null at any given moment?
(DIR) Post #AZzXUTke84f8C9wAL2 by fgaz@cdrom.tokyo
2023-09-21T11:08:42.476745Z
0 likes, 0 repeats
Just how much data gets produced and the immediately thrown away into /dev/null at any given moment?Hmm actually I can easily find that out…
(DIR) Post #AZzXUUbSxgugpyeLfU by fgaz@cdrom.tokyo
2023-09-21T12:03:09.660068Z
3 likes, 0 repeats
The answer appears to be 0. They just like to know that it’s there
(DIR) Post #AZzXUWLwSNgSGPOykS by fgaz@cdrom.tokyo
2023-09-21T12:08:08.378442Z
2 likes, 0 repeats
But wait, that was a regular file! A file that can be overwritten (and reset to 0 bytes) by multiple processes, so it could be that I just didn’t see the data in time.So I tried to make it a FIFO… forgetting that FIFOs are blocking until a reader is set up. My shell instantly locked up, and so did the most random parts of the system
(DIR) Post #AZzhjRbzMjVvRcf8Ua by steph@toot.party
2023-09-21T11:23:26Z
0 likes, 0 repeats
@fgaz how do you delete the void
(DIR) Post #AZzhjSR2IwLZzwXu3k by steph@toot.party
2023-09-21T11:23:44Z
1 likes, 0 repeats
@fgaz asking for a friend
(DIR) Post #AZzrculJaNhnMqY96u by jordan@sometimes.social
2023-09-21T14:08:23Z
4 likes, 1 repeats
@fgaz At a job long in the past, I had a coworker who was very enamored of a particular do-everything Python library which I will not name at this time. This library included some built-in logging facilities, but he didn't actually need the log for the thing he was making, so he set it to log to `/dev/null`.It turns out that this library had automatic log rotation built in. The way it worked was that it kept track of the number of bytes written to a log, and when it crossed a certain threshold, it would rename the file it was logging to, and open a new log file.Unfortunately, the thing my coworker built ran as `root`. It started up and ran fine for a while, merrily logging to `/dev/null` as instructed. After a while, though, it noticed "oh hey I've written more than a megabyte of logs, time to rotate the log file" - it then renamed `/dev/null` to `/dev/null.YYYY-mm-dd.HH:MM:SS` and created a new `/dev/null` that was just a regular text file. From that point onward, anything that got written to `/dev/null` actually got written to disk. Chaos ensued.That one took a whole day to figure out...
(DIR) Post #AZzxRAkYuulPCdyvx2 by greygoo@madscientists.social
2023-09-21T11:16:33Z
1 likes, 0 repeats
@fgaz If it's linux: mknod -m 0666 /dev/null c 1 3but I guess you know that :)
(DIR) Post #AZzylCe1gNY0pC2WsS by m0xEE@breloma.m0xee.net
2023-09-21T17:24:08.210867Z
0 likes, 0 repeats
@fgaz Software receives orders from our opensource overlords via this device file :marseyilluminati2:
(DIR) Post #Aa00PXNm6BdUgCEdxA by lanodan@queer.hacktivis.me
2023-09-21T17:42:11.702215Z
0 likes, 0 repeats
@GNUxeava @duponin @fgaz Normal tmpfs and I think most of it's usage should be deprecated hard.
(DIR) Post #Aa01UWJRbUoOlP9KHg by attie@chaos.social
2023-09-21T17:51:46Z
0 likes, 0 repeats
@lanodan @fgaz @duponin if by "regular file" you mean "character special", then sure... and what about sysfs, securityfs, debugfs, etc... for pseudo-filesystems?"Virtual File System", or VFS is different again?https://docs.kernel.org/filesystems/vfs.html
(DIR) Post #Aa01UXAcPnLXQK1nAO by lanodan@queer.hacktivis.me
2023-09-21T17:54:35.523086Z
0 likes, 0 repeats
@attie @fgaz @duponin Fine, there's a bit more than just procfs.But the point is: devtmpfs just allows whatever.
(DIR) Post #Aa02EN2kOniVKuCdSy by attie@chaos.social
2023-09-21T18:00:46Z
1 likes, 0 repeats
@lanodan ah, thought I was having a moment there 😂🙈
(DIR) Post #Aa0APAWc56PnKWpeqW by rakslice@mastodon.social
2023-09-21T19:25:54Z
0 likes, 0 repeats
@lanodan @fgaz @duponin that's not what "regular file" means on Linux (or any Unix)
(DIR) Post #Aa0APBMMyfobv32zWC by lanodan@queer.hacktivis.me
2023-09-21T19:34:27.316621Z
0 likes, 0 repeats
@rakslice I'm aware, this is just pedantry. We all know I'm not saying /dev/null is a regular file as in non-special.And given repliers here love their kind of correctness, here's mine: /dev/null is *any* file, due to /dev being on a regular filesystem (tmpfs or on-disk) and not a virtual filesystem (like procfs).And that's a mouthful, yet I'm sure it'll trigger your kind.
(DIR) Post #Aa0COXQjdPcBzJuT8C by rakslice@mastodon.social
2023-09-21T19:55:58Z
0 likes, 0 repeats
@lanodan just like "we all know" nobody was asking how it's possible to delete /dev/null
(DIR) Post #Aa0COYF4cFsgVRSfaq by lanodan@queer.hacktivis.me
2023-09-21T19:56:45.792540Z
0 likes, 0 repeats
@rakslice Literally second post in the thread: https://udongein.xyz/objects/a5ffd7f9-44d5-4c12-8ce9-2a92cb64a743
(DIR) Post #Aa3uKlIF84PrHZpL1s by nishi@hkgk.nishi.boats
2023-09-23T14:53:39.952914Z
0 likes, 0 repeats
@fgaz r̶̨̨̡̺͎͚̭̟͍̭͎̺̦̊̃̊̌̋̓̔́̑̇̕͘͠ē̸͓̣̙͕͕͙̮̅̚͠a̸͉̗̙͕͕̰̰̣̱̫͈͔͎̔̓̇̌d̴̢̺͇̭̦͈̬̩͓͎̙͖̱͎͇̦̊̔̀͊̽̑̈́̈́̏̀̔̋̕͜͝-̷̨̱͔́͘o̶̯͋̚̕ņ̸̤͓̯̪̩͕̏͛̄͊̓́͠l̵͉̲̻̱̦̣̟̮͕̲̏̔̿̓͋͌̓̄͛͘͠y̸̢̭̪̦̟̳͂̎͛̿͋̍̂͗͒̍̿͊̄̉̋͝ ̴̧̜͉̯̭̝̗̪̣͕̩̮̗̈́̊͜/̵̧̟̥͙̰̫͕̲̙͙̦͚͕͊d̷̨̮̠̺̗̣̗̹͍̎̀̉̅͗̾̈́̓̓̔̕͜͝e̵̪͙̗̱͖̤̲̖̗̞͎̹̱̲͎̅̕v̵̮̬̫͚̤̘̘͓̥̜̙̆͋̑̿̇̀̎̂̇̂̈́̀̿̇̾͘͘ͅͅ/̶͇̺̆̎̒̔͐͐̂̏n̵̛͎͛͌̆̃̿̆̽̑̓̋ű̴̩̹̟̰̯̬̗͚͉͔̈͒l̶̛͕̳̜͉̪̈́̒͌̈́̔͒̎̔̂̀͆̕͝͝l̴̋̏͊͂̐̀̑̚͜͝