[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File deleted.
Why are devices in windows not files like in gano/launux?
>>
>>100141936
but they are
try creating a file named CON
>>
>>100141936
because the file api is inadequate for device operations
at least if they were filesystem it would be usable
now we have to rely on completely undocumented ioctl commands and just hope for the best
>>
File: 1693106462523978.png (89 KB, 400x400)
89 KB
89 KB PNG
>>100141936
Why are partitions in linux not separated like in windows?
>>
>>100141936
>files like in gano/launux?
Network devices aren't files.
>>
>>100143699
Yeah, they are.
>>
>>100141936
because winblows niggers are ratarded
>>100141959
you are retarded, making memory locations you want to map "files" is great design.
>>
>>100143699
well, the file is the buffer for each process to be written to the port
>>
>>100143757
>>100143795
No. Sockets are file descriptors, but they aren't files in the filesystem. Network devices like eth0 aren't files at all.
>>
>>100143822
you map sockets (aka "hello kernel i would like you to write this to the port when i call msync()") and use that, thats how you fucking write to sockets. Do you count chars byte by byte in an array on the stack with write()? stupid nigger.
>>
>>100143944
Everything I mentioned are hard facts. msync is for mmap, it's unrelated to sockets.
Are you a badly tuned bot?
>>
>>100141959
so when does the file design fail?
>>
>>100144022
do you even program? you are embarassing. Just shut up when adults talk about topics you know nothing about.
>>
>>100145035
I'm a highly experienced C programmer. Unlike me you still haven't listed any facts, or anything at all to prove me wrong.
Do you even have a brain?
>>
>>100143822
Sockets appear in /dev/fd/n where n is the process's file descriptor (in linux). But I don't know how it gets from the file descriptor to /dev/eth0. Is the kernel packet scheduler and stuff before or after eth0?
>>
>>100141994
they aren't separated in windows. there's a secret hierarchy which all partitions are just children of. The G:\ stuff is just a cosmetic overlay to make things "friendly" for grandma.
>>
>>100146059
>Sockets appear in /dev/fd/n where n is the process's file descriptor (in linux).
That's just a symlink to /proc/self/fd. All FDs appear there, but that doesn't really make them a filesystem accessible thing. For example, you can't open a TCP socket by opening a device-like file on the socket. You can do that with other things, like terminals and block devices. /proc/self/ is just for introspection and debugging. Other Unixes don't necessarily have that.
You are right that opened sockets can be called files because you can access them normally with the write/read syscalls.
>But I don't know how it gets from the file descriptor to /dev/eth0.
Again, network devices aren't files. They don't appear on the filesystem. Unlike sockets, you can't even get FDs to them. Linux uses the netlink API to access them from userspace. The filesystem isn't involved. You can check with "strace ip link".
> Is the kernel packet scheduler and stuff before or after eth0?
What? Packet scheduler could mean anything.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.