Bug 109021 - reset GREP_OPTIONS in bash startup script
reset GREP_OPTIONS in bash startup script
Status: NEW
Product: platform
Classification: Unclassified
Component: -- Other --
6.x
All Linux
: P3 (vote)
: TBD
Assigned To: issues@platform
issues@platform
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-06 14:33 UTC by javajoe
Modified: 2009-01-06 14:24 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description javajoe 2007-07-06 14:33:06 UTC
This is quite unusual, but if a linux user has the GREP_OPTIONS set in their shell (to help highlite grep searches), it
will mess up the memory allocation routine in heap_size() (netbeans bash startup script)

The fix:
add the following to the Linux case:

export GREP_OPTIONS=

You may want to place it earlier in the script, but this worked for me. This allows the next line which tries to read
the meminfo to work, rather then get a blank value for $mem

snip-it below
...
heap_size () {
    mem=128
    case "`uname`" in
        Linux*)
--->>   export GREP_OPTIONS=
        mem=`cat /proc/meminfo | grep MemTotal | tr -d [:space:][:alpha:]:`
        mem=`expr $mem / 4096`
        ;;
    SunOS*)
        mem=`/usr/sbin/prtconf | grep Memory | /usr/xpg4/bin/tr -dc '[:digit:]'`
        mem=`expr $mem / 4`
        ;;
# Disable the heuristics on Mac until we resolve #106965
...
Comment 1 Petr Chytil 2008-09-17 11:45:19 UTC
reassigning to core/code


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo