Changeset 106 for trunk/oarutils/oar-envsh
- Timestamp:
- May 14, 2014, 7:26:58 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oarutils/oar-envsh
r105 r106 11 11 # 1.1 Patrick Begou (all the environment excepted... that could make problems!) 12 12 # 1.2 Gabriel Moreau (format, small bug and licence) 13 # 1.3 Gabriel Moreau (add initial support for ulimit) 13 14 # 14 15 … … 16 17 shift 17 18 18 ulimit_s=$(ulimit -s) 19 ulimit_n=$(ulimit -n) 20 ulimit_l=$(ulimit -l) 19 MYLIMIT="" 20 for option in 's' 'l' 'n' 21 do 22 myvalue=$(ulimit "-$option") 23 [ -n "$myvalue" ] && MYLIMIT="${MYLIMIT} ulimit -$option $myvalue;" 24 done 21 25 22 26 MYENV=$( env \ … … 31 35 | tr [\\\n] [\;] ) 32 36 33 exec /opt/oar/current/bin/oarsh $HOST " ulimit -s ${ulimit_s}; ulimit -n ${ulimit_n}; ulimit -l ${ulimit_l};$MYENV $@"37 exec /opt/oar/current/bin/oarsh $HOST "$MYLIMIT $MYENV $@" 34 38 35 39 exit … … 62 66 SHLVL 63 67 68 With C<oar-envsh>, some ulimit are also transfert in the new shell. 69 Actually, we only transfert: 70 71 -l locked memory 72 -n open files 73 -s stack size 74 64 75 Alway use C<oarsh>, 65 76 only use C<oar-envsh> if really needed! … … 83 94 GPL version 2 or later 84 95 85 Copyright (C) 2011 Patrick Begou / LEGI - CNRS UMR 5519 - France96 Copyright (C) 2011-2014 Patrick Begou / LEGI - CNRS UMR 5519 - France 86 97 87 98 =cut
Note: See TracChangeset
for help on using the changeset viewer.