Drew Parsons wrote: > On Thu, 2006-02-23 at 14:57 +0100, Christoffer Hammarström wrote: > >>Can you >> >>>really run ulimit -n 8192 after having removed xprint? >>> >> >>Yes, i can. This is because i've added the following lines to >>/etc/security/limits.conf: >> >>* soft nofile 8192 >>* hard nofile 32768 >> >>I'm sorry for not stating this earlier. > > > OK, but then... > > >>The problem is not Xprt or xprint itself, but that the ulimit is set too >>low for my daily usage, in /etc/init.d/xinit >>I'm unable to change it, and the values set in /etc/security/limits.conf >>are ignored. > > > This doesn't make sense. If you can change /etc/security/limits.conf > (i.e. you do have superuser rights) than why can't you likewise change > the value in /etc/init.d/xprint to suit your needs ? >
I'm sorry, i misspoke. What i actually meant is that of course i can change it as root, but i should not have to. It should be enough to set it in /etc/security/limits.conf. Suppose that i did not have superuser rights, and asked some admin to increase my ulimit? He would edit /etc/security/limits.conf appropriately, but this would be hard-overridden the next time /etc/init.d/xprint is executed, for example during boot. The problem is that /etc/init.d/xprint hard-overrides whatever setting is in /etc/security/limits.conf > Can you explain what led you to believe Xprt was the cause of the > problem? Xprt's use of ulimit -n 1024 should affect it, and it alone, > not other processes. > I do *not* believe Xprt is the problem. I'm no longer running it. I disabled it to work around this problem, as i don't need printing anyway. To reiterate, i *do* believe the problem is that the script /etc/rc.d/xprint hard-overrides whatever value is set in /etc/security/limits.conf. How about only setting the ulimit to 1024 if it's lower than 1024? I want to contribute something useful to this discussion :) I believe something like the following patch should fix the problem: --- xprint 2006-02-23 16:11:11.000000000 +0100 +++ xprint.new 2006-02-23 16:11:43.000000000 +0100 @@ -202,7 +202,7 @@ umask 022 # Bump limit for per-process open files to ensure that Xprt can open many many fonts -ulimit -n 1024 +((`ulimit -n` < 1024)) && ulimit -n 1024 ############################################################################ Thank you for your attention and patience. Christoffer Hammarström [EMAIL PROTECTED]
signature.asc
Description: OpenPGP digital signature