guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to write services (was: Re: Teams)


From: Maxime Devos
Subject: Re: how to write services (was: Re: Teams)
Date: Thu, 16 Jun 2022 00:13:33 +0200
User-agent: Evolution 3.38.3-1

Blake Shaw schreef op wo 15-06-2022 om 21:40 [+0000]:
> > AFAIK no relation to GNU.
> 
> I thought recalled hearing it used in relation to GNU/Linux. A quick
> search
> brings up this stackexchange discussion[1], which quotes the book
> "Linux
> Philosophy" with the following:
> 
> #+begin_example
> Whenever possible, Linux makes its components available via files or
> objects
> that look like files. Processes, devices, and network sockets are all
> represented 
> by file-like objects, and can often be worked with using the same
> utilities used
>  for regular files.
> #+end_example
> 
> So the contents of /proc are file-like objects, but AFAIK they
> strictly aren't files
> per-se, but representations of processes that take the shape of a
> file at a 
> particular instance in time.
> 
> [1]
> https://unix.stackexchange.com/questions/416778/what-is-file-like-objects-in-linux

From Guix and Guile's perspective, things in /proc are just (OS) files
that happen to be dynamically generated.  Devices are weird files that
need a special I/O API, but still files).  Some information on
processes is available in files, but the process itself isn't a file.

I would say that sockets (except for unix domain sockets) aren't files
and are rather unlike files (you cannot copy, hardlink, mv, symlink or
stat them, they don't have file names, they don't have an
owner/group/...) -- the only similarity seems to be the basis on file
descriptors and the possibility of read/write.

However, you cannot save sockets in the store, so from Guix perspective
even Unix domain sockets aren't file-like.

Though good point about the potential confusing with Linux' notion of
file-like objects!

Greetings
Maxime.

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]