brown@nicmad.UUCP (04/20/86)
[Take this poison, you dumb line-eater!!!!]
I previously posted an article requesting help on why inews/rnews was not
successfully posting articles for certain people.
Well, Laura (trwrb!ljb) sent me a note saying that possible the 'limit
filesize' environment parameter was causing the problem. It was. The users
is question had a limit of 2m. I had removed mine long ago. Because I have
enough disk space, news can be kept on line for 4 weeks, enough to keep the
history file over the limit.
My public thanks to Laura for her help.
Mike Brown
--
ihnp4------\
harvard-\ \
Mr. Video seismo!uwvax!nicmad!brown
topaz-/ /
decvax------/muller@sdcc7.UUCP (Keith Muller) (04/23/86)
I had the same problem quite a while ago. However in my case student accounts
were set up with both cpu and file limits to help prevent runaway homeworks
etc from loading down the machine. I couldn't remove the limits, so I added
the following into inews. (applies only to 4.[23] BSD).
Keith Muller
University of California
*** OLD/inews.c Wed Mar 19 17:14:29 1986
--- inews.c Fri Mar 21 00:39:17 1986
***************
*** 21,26 ****
--- 21,29 ----
#endif /* SCCSID */
#include "iparams.h"
+ #ifdef BSD4_2
+ #include <sys/resource.h>
+ #endif /* BSD4_2 */
#include <errno.h>
/* local defines for inews */
***************
*** 96,101 ****
--- 99,120 ----
register int i;
FILE *mfd; /* mail file file-descriptor */
char cbuf[BUFLEN]; /* command buffer */
+ #ifdef BSD4_2
+ struct rlimit reslimit; /* resource limits inherited from parent*/
+
+ /*
+ * if a user has limit set in his shell, inews when invoked from
+ * postnews might fail (such if the file size limit is small)
+ */
+ if (getrlimit(RLIMIT_CPU, &reslimit) == 0){
+ reslimit.rlim_cur = reslimit.rlim_max;
+ (void)setrlimit(RLIMIT_CPU, &reslimit);
+ }
+ if (getrlimit(RLIMIT_FSIZE, &reslimit) == 0){
+ reslimit.rlim_cur = reslimit.rlim_max;
+ (void)setrlimit(RLIMIT_FSIZE, &reslimit);
+ }
+ #endif /* BSD4_2 */
/* uuxqt doesn't close all it's files */
for (i = 3; !close(i); i++)