Great Circle Associates Majordomo-Users
(October 1994)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: majordomo 1.92 - lists command doesn't work
From: Brent Chapman <brent @ miles . greatcircle . com>
Date: Mon, 31 Oct 1994 18:34:08 -0800
To: "Douglas Gatchell" <dgg @ lanl . gov>
Cc: majordomo-users @ greatcircle . com
In-reply-to: Your message of Mon, 31 Oct 1994 18:14:12 -0700

"Douglas Gatchell" <dgg@lanl.gov> writes:

# The lists command has ceased to work for us. I suspect it is the same
# problem that results when we try to ls the directory (ie ls /listdir/*
# results in
# Arguments too long.).
# 
# I have looked at the code in majordomo ( while(<${listdir}/*>) { )
# and have determined that this returns a null list.
# 
# Is there anyway around this?  Is there a finite number of lists that
# majordomo can handle.  We curretly have 294 lists and 1725 entries in the
# directory.

There's a limit to how big a directory you can handle with a <...>
construct in perl (the limit isn't actually in perl, it's in sh or
csh, which is what perl uses to expand the <...> constructs).

What you need to do is replace the

	while (<${listdir}/*>) {
		...
	}

with something like:

	opendir(DIR, "$listdir") || die("opendir(DIR, \"$listdir\"): $!");
	while ($_ = readdir(DIR)) {
		...
	}
	closedir(DIR);

-Brent
--
Brent Chapman         | Great Circle Associates  | Call or email for info about
Brent@GreatCircle.COM | 1057 West Dana Street    | upcoming Internet Security 
+1 415 962 0841       | Mountain View, CA  94041 | Firewalls Tutorial dates

Indexed By Date Previous: Re: WWW + Majordomo (plz post the InterNIC code)
From: "Stephen A. Brenner" <sbrenner@efn.org>
Next: Initial release of www-majordomo
From: Paul Phillips <paulp@primus.COM>
Indexed By Thread Previous: majordomo 1.92 - lists command doesn't work
From: "Douglas Gatchell" <dgg@lanl.gov>
Next: Initial release of www-majordomo
From: Paul Phillips <paulp@primus.COM>

Google
 
Search Internet Search www.greatcircle.com