Hi,

fuser seems to be misbehaving for me.  It does not return the PID for
UNIX sockets.  I wrote the following little script to illustrate my
problem:


------------------------------
#!/usr/bin/perl -Tw
use strict;
use Socket;
use Carp;

my $server;
socket($server,PF_UNIX,SOCK_STREAM,0)        || die "socket: $!";
bind  ($server, sockaddr_un('sockfile.ctl'))       || die "bind: $!";
listen($server,SOMAXCONN)                    || die "listen: $!";
while (1) {
  my $client;
  accept($client, $server);
  my $data = <$server>;
  print "$data";
}
--------------------------------

After starting it, I run the following:

------------------------
[EMAIL PROTECTED]:~$ fuser sockfile.ctl
[EMAIL PROTECTED]:~$ lsof -t sockfile.ctl
6293
------------------------

fuser doesn't return anything, and lsof returns the correct
PID--although both take a long time (~30s) to return.  It seems that not
too long ago, fuser worked, and the return time was quick.

This seems to be the case on both my etch and sid boxes.  Any ideas?

Casey



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to