Bug#159090: acct: "-f -" option works for pipe:[xxx] but not socket:[xxx]

2011-03-28 Thread Mathieu Trudel-Lapierre
reassign 159090 ksh
thanks

On Sat, Mar 19, 2011 at 2:04 PM, Jeff Green  wrote:
[...]
> The problem show specifically when using the ksh package, as opposed to
> the pdksh package (or possibly others).
[...]
> If the shell is switched to pdksh, tcsh, or sh (which I suppose is dash), then
> the pipe works okay, e.g.:

This being the case, I'd be tempted to say it's really an issue with
ksh's handling of pipes, not lastcomm and all not supporting sockets
-- especially when it works with many of the most common shells.

Please let me know if you disagree or can explain the reasoning
further to say the issue is in acct -- for now, reassigning to ksh,
since ls also sees the pipe building fd/0 as a socket.

Regards,

Mathieu Trudel-Lapierre 
Freenode: cyphermox, Jabber: mathieu...@gmail.com
4096R/EE018C93 1967 8F7D 03A1 8F38 732E  FF82 C126 33E1 EE01 8C93



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#159090: acct: "-f -" option works for pipe:[xxx] but not socket:[xxx]

2011-03-19 Thread Jeff Green
Package: acct
Version: 6.5.4-2.1
Severity: normal


The problem show specifically when using the ksh package, as opposed to
the pdksh package (or possibly others).

Running:

% cat pacct | (ls -l /proc/self/fd)
total 0
lrwx-- 1 root root 64 Mar 19 13:33 0 -> socket:[9391328]
lrwx-- 1 root root 64 Mar 19 13:33 1 -> /dev/pts/0
lrwx-- 1 root root 64 Mar 19 13:33 2 -> /dev/pts/0
lr-x-- 1 root root 64 Mar 19 13:33 3 -> /proc/30907/fd

And then:
% cat pacct | lastcomm -f -
couldn't open file '/proc/self/fd/0': No such device or address

If the shell is switched to pdksh, tcsh, or sh (which I suppose is dash), then 
the pipe works okay, e.g.:

% sh
%% cat pacct | (ls -l /proc/self/fd)
total 0
lr-x-- 1 root root 64 Mar 19 13:39 0 -> pipe:[9393029]
lrwx-- 1 root root 64 Mar 19 13:39 1 -> /dev/pts/0
lrwx-- 1 root root 64 Mar 19 13:39 2 -> /dev/pts/0
lr-x-- 1 root root 64 Mar 19 13:39 3 -> /proc/30946/fd

%% cat pacct | lastcomm -f - | head
accton   S root __ 0.00 secs Sat Mar 19 00:26
acct   root __ 0.00 secs Sat Mar 19 00:26
acct   root __ 0.00 secs Sat Mar 19 00:26
invoke-rc.droot __ 0.00 secs Sat Mar 19 00:26
acct   root __ 0.00 secs Sat Mar 19 00:26
apache2root __ 0.00 secs Sat Mar 19 00:26
cmproot __ 0.00 secs Sat Mar 19 00:26
which  root __ 0.00 secs Sat Mar 19 00:26
apt-config root __ 0.00 secs Sat Mar 19 00:26
apt-config root __ 0.00 secs Sat Mar 19 00:26


This behavior is consistent across all platforms that I have at my disposal,
i386, powerpc, and armel.

-jeff

-- System Information:
Debian Release: 6.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.32-5-powerpc
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages acct depends on:
ii  dpkg  1.15.8.10  Debian package management system
ii  install-info  4.13a.dfsg.1-6 Manage installed documentation in 
ii  libc6 2.11.2-10  Embedded GNU C Library: Shared lib

acct recommends no packages.

acct suggests no packages.

-- Configuration Files:
/etc/default/acct changed [not included]

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org