Gentoo Archives: gentoo-user

From: Amit Dor-Shifer <amitds@××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: [OT] shell ouput which file descriptor
Date: Sun, 11 Apr 2010 06:41:24
Message-Id: 4BC16EF7.9030608@oversi.com
In Reply to: [gentoo-user] Re: [OT] shell ouput which file descriptor by Harry Putnam
1 permission issue?
2 any EACCES in strace output?
3 Amit
4
5 Harry Putnam wrote:
6 > Harry Putnam <reader@×××××××.com> writes:
7 >
8 >
9 >>> $cat /tmp/testfile
10 >>> cat: nonexistantfile: No such file or directory
11 >>>
12 >> Thanks...
13 >>
14 >>
15 >>> Are you running cvs as root, or user, or ...?
16 >>>
17 >> I was running cvs as user, and now trying your tests... it appears the
18 >> trouble has stopped... doesn't occur now in cvs cmds either.
19 >>
20 >> There was a reboot in between, so may never now what was going on.
21 >>
22 >> Prior to rebooting I had tried to get a fresh env by ssh
23 >> user@localhost from an xterm. Hoping to rule out some oddball env
24 >> problem, but the file descriptor problem persisted. However it has
25 >> apparently not survived a reboot.
26 >>
27 >
28 > Yikes... more mysterious than I reported above.
29 >
30 > I see now that I get the goofy acting file descriptors when I'm in
31 > console mode, but not in X.
32 >
33 > And it appears only to happen in cvs commands, but again, not in X.
34 >
35 > My sequence:
36 >
37 > Reboot just now.
38 >
39 > At console login:
40 >
41 > login and call cvs command:
42 >
43 > cvs -n update /usr/local/common/base 2>er
44 >
45 > I see 83 lines scroll by.
46 >
47 > cat er
48 > cat: er: No such file or directory
49 >
50 > Nothing has been redirected.
51 >
52 > cvs -n update /usr/local/common/base 2>er|wc -l
53 >
54 > I still see 83 lines but wc -l reports 0
55 > (as it should)
56 >
57 > So somehow the redirect is ignored and stderr goes to console
58 > anyway.
59 >
60 > Trying your test
61 > cat none 2>er
62 >
63 > cat er
64 > cat: none: No such file or directory
65 >
66 > So stderr is doing what it is supposed to do with cat but not a cvs
67 > command.
68 > ------- --------- ---=--- --------- --------
69 > Now startx and from an xterm:
70 > cvs -n update /usr/local/common/base 2>er
71 > <no output> just like expected
72 >
73 > Follow with:
74 > cat er|wc -l
75 > 83
76 > (83 lines of ouput were captured with 2>er)
77 >
78 > So this is more puzzling than ever. Weird phenomena in console that
79 > stops when in X.
80 >
81 >
82 >
83 >