From: Daniel Bastos <dbastos@toledo.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] on cp /fd/1 /fd/0
Date: Tue, 12 May 2015 11:17:54 -0300 [thread overview]
Message-ID: <CAB08-qprY8hqe4QV7fbhhc2o+jVyAJXyBQUmdb2WZtddf1GZJw@mail.gmail.com> (raw)
In-Reply-To: <CABJnqBShfOCtcuHbeSNPBWSODGnGWp1qZSb51njjPEaATy5LEA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1014 bytes --]
On Tue, May 12, 2015 at 9:24 AM, Iruatã Souza <iru.muzgo@gmail.com> wrote:
> --r-------- d 0 glenda glenda 0 May 10 18:57 0
> --rw------- d 0 glenda glenda 0 May 10 18:57 1
> ---w------- d 0 glenda glenda 0 May 10 18:57 2
>
> is that what you want to know? or the reasons why the permissions are like
> that?
>
I want to understand the system. (It makes sense to me that the permissions
are like that.)
What is the relationship between file descriptor 1 and /fd/1? When a
program runs, 1 is already open for writing. But apparently it's open only
for writing. A read on it yields inappropriate use of fd. The same seems to
happen /fd/1. Can I say they'll both always present the same behavior?
I'm not able to change permissions on /fd/1. Why not?
% ls -l /fd/1
---w------- d 0 dbastos dbastos 0 May 19 2014 /fd/1
% chmod u+r /fd/1
chmod: can't wstat /fd/1: permission denied
I'm studying. One thing I imagined was to write to standard output and be
able to read what I wrote.
[-- Attachment #2: Type: text/html, Size: 2330 bytes --]
next prev parent reply other threads:[~2015-05-12 14:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-12 11:56 Daniel Bastos
2015-05-12 12:24 ` Iruatã Souza
2015-05-12 12:39 ` lucio
2015-05-12 13:20 ` erik quanstrom
2015-05-12 14:17 ` Daniel Bastos [this message]
2015-05-12 16:15 ` Charles Forsyth
2015-05-12 17:10 ` Daniel Bastos
2015-05-12 18:54 ` Charles Forsyth
2015-05-12 15:52 ` Charles Forsyth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAB08-qprY8hqe4QV7fbhhc2o+jVyAJXyBQUmdb2WZtddf1GZJw@mail.gmail.com \
--to=dbastos@toledo.com \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).