FUZIX icon indicating copy to clipboard operation
FUZIX copied to clipboard

Teach fsck about sockets

Open EtchedPixels opened this issue 7 years ago • 4 comments

We can get stale socket inodes and right now we clean them up fine but report them as not the correct type and ask the user to Zap them

EtchedPixels avatar Sep 07 '18 11:09 EtchedPixels

@EtchedPixels I came across this issue while looking for a simple bug to get started with FUZIX development on. I believe I have a fix for this issue, but I was wondering if you knew of a good way to generate a stale socket inode so that I can test my changes before submitting a pull request?

protoCall7 avatar Oct 04 '19 21:10 protoCall7

I think the simplest way may be to use mknod as root to create fake ones

        mknod("/tmp/asocket", 0140700, 0);
        unlink("/tmp/asocket");
        uadmin(A_REBOOT, 0, 0);

or maybe even just hack ucp so you can add some ?

EtchedPixels avatar Oct 05 '19 14:10 EtchedPixels

Thanks for the input, @EtchedPixels, the snippet above seems to do the trick!

On a related note, when booting with an improperly unmounted disk, is there a way to get a single-user mode, or another method of doing something similar to yes | fsck -a so that I don't have to spend as much time hitting "y" in order to test my changes?

protoCall7 avatar Oct 14 '19 21:10 protoCall7

You can change the /etc/rc scripts for one

EtchedPixels avatar Oct 14 '19 21:10 EtchedPixels