From owner-freebsd-hackers Mon Feb 16 18:08:10 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA05982 for freebsd-hackers-outgoing; Mon, 16 Feb 1998 18:08:10 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from panda.hilink.com.au (panda.hilink.com.au [203.8.15.25]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA05919 for ; Mon, 16 Feb 1998 18:07:48 -0800 (PST) (envelope-from danny@panda.hilink.com.au) Received: (from danny@localhost) by panda.hilink.com.au (8.8.5/8.8.5) id NAA24505; Tue, 17 Feb 1998 13:07:42 +1100 (EST) Date: Tue, 17 Feb 1998 13:07:42 +1100 (EST) From: "Daniel O'Callaghan" To: freebsd-hackers@FreeBSD.ORG cc: brenda@thereef.com.au Subject: Weird problem with perl5.004 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have a weird problem under FreeBSD 2.2-980123-SNAP, with perl5. I have a feeling that it must be something to do with resource limits, but I can't figure out what. The program quoted below has two sections, which do the same thing, one using glob() and the other using readdir(). Both sections work fine when run as root, but only readdir() works as a normal user. I've tried increasing various limits of the normal user, to no avail. Any ideas, please? #!/usr/local/bin/perl5.004_04 $filedir = "/home/ftp/pub/"; print "------- Using glob() -----------\n"; @files = glob("$filedir*"); print "There are $#files files\n"; foreach $filename (@files) { $filename =~ s/^\/.*\///; print "$filename\n"; } print "----- Using readdir() -----------\n"; opendir(D, "$filedir"); @files = readdir(D); print "There are $#files files\n"; closedir(D); foreach $filename (@files) { $size = -s $filename; $filename =~ s/^\/.*\///; print "> $filename\n"; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message