On 12 May 2015 at 18:10, Daniel Bastos wrote:
> could never work because it requires opening /fd/1 for reading, which
> is not possible. Is this conclusion incorrect?
>
It's not right. I'll try again.
/fd/1 gives a name to file descriptor 1.
When opened, you get a new file descriptor (not 1) th
On Tue, May 12, 2015 at 1:15 PM, Charles Forsyth
wrote:
> On 12 May 2015 at 15:17, Daniel Bastos wrote:
>>
>> 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 inap
On 12 May 2015 at 15:17, Daniel Bastos wrote:
> 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
On 12 May 2015 at 12:56, Daniel Bastos wrote:
> % cp /fd/1 /fd/0
> cp: can't open /fd/1: '/fd/1' inappropriate use of fd
>
> I can't open it for reading, but I could open it for writing. Why can't I
> open it for reading?
>
The file open on file descriptor 1 wasn't itself opened for reading, onl
On Tue, May 12, 2015 at 9:24 AM, Iruatã Souza 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
> Except that OP wants to know why reading /fd/1 isn't allowed when the
> permissions allow it. I suspect something is a bit obscure, like the
> implementation being different from the stated permissions.
i imagine that the permissions on the underlying device are wrong.
"cons" is 600 in rio, and
> --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?
Except that OP wants to know why reading /fd/1 isn't allowed w
--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?
On Tue, May 12, 2015 at 8:56 AM, Daniel Bastos wrote:
> Good morning.
>
>
Good morning.
% cp /fd/1 /fd/0
cp: can't open /fd/1: '/fd/1' inappropriate use of fd
I can't open it for reading, but I could open it for writing. Why can't I
open it for reading?