Sam Varshavchik <[EMAIL PROTECTED]> writes:

> Lloyd Zusman writes:
>
>> Because of this, I would like to propose that the above test in
>> courier/configure be modified as follows (or at least similarly):
>>   if $CONFIG_SHELL -c "ulimit -v 0"
>>   then
>>           ULIMIT='ulimit -v'
>>   else
>>           ULIMIT='ulimit -d'
>>   fi
>> The "$CONFIG_SHELL -c" thing is needed because we don't want this test
>> to change the ulimit of the shell that's running courier/configure.
>
> This doesn't appear to work.  $CONFIG_SHELL is not always set by the
> configure script.  $SHELL is the right variable.

In the latest release (courier-0.45.2.20040325.tar.bz2), this still has
the same problem.  The following appears in courier/configure{.in}, but
it still doesn't address the issue I raised in my earlier message:

  if $SHELL -c 'ulimit -v 2>/dev/null'
  then
          ULIMIT='ulimit -v'
  else
          ULIMIT='ulimit -d'
  fi

On my system, "ulimit -v" works, but "ulimit -v ARGUMENT" _doesn't_
work.  This is the case that I originally wrote about.  For example:

  % ulimit -v
  589824
  % ulimit -v 589824
  bash: ulimit: virtual memory: cannot modify limit: Invalid argument

In all of the courier startup scripts, "ulimit -d/-v" is used _with_ an
argument.  Hence, the test in the 45.2.20040325 release still does not
cover that case.  The test we need is this:

  if $SHELL -c 'ulimit -v 0 2>/dev/null'
  then
          ULIMIT='ulimit -v'
  else
          ULIMIT='ulimit -d'
  fi

Note the numeric argument after the '-v' in the 'if' line.  I chose
zero, but this could be any other reasonable number.  The reason that
this has to be done via "$SHELL -c" is so that the "ulimit" call doesn't
alter the resource limits of the shell that is running the
courier/configure script itself.


-- 
 Lloyd Zusman
 [EMAIL PROTECTED]



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to