Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 26939

Summary: xargs vs init.d scripts (xargs: environment is too large for exec)
Product: Gentoo Linux Reporter: Jean-Francois Patenaude <jf.patenaude>
Component: [OLD] Core systemAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jean-Francois Patenaude 2003-08-19 11:44:03 UTC
FYI, 
 
The environment in init.d script is becoming too large for running xargs. 
xargs has an internal check limiting the environment size to 20kb 
(instead of Linux default which is 128kb) 
 
        Ref: http://mail.gnu.org/archive/html/bug-findutils/2001-10/msg00000.html 
 
So when I run "xargs" in an init.d script I get a message like: 
        "xargs: environment is too large for exec" 
 
Two solutions I see ... have a smaller environment (it currently has 30kb) 
or patching xargs to stop being a sissy. 
 
In the meantime, I'll use a small hack in my scripts just before the 
xargs command: 
 
        unset ` env | egrep '^depinfo_' | sed 's/=.*$//' ` 
 
Jf. 
 

Reproducible: Always
Steps to Reproduce:
1. add "xargs" in an init.d script 
2. try this also :   env | wc -c 
3. 
Actual Results:  
xargs: environment is too large for exec 


I've seen that "bootmisc" has a "xargs" ... I don't know if it fails (didn't test)
Comment 1 SpanKY gentoo-dev 2003-08-19 15:30:17 UTC
if you're running the latest baselayout then re-open, otherwise this bug has been 
fixed 

*** This bug has been marked as a duplicate of 23569 ***