On Tue, 31 Jul 2001, Yann Sagon wrote:

> ulimit               (3)  - get and set user limits

la routine de biblioth�que C

> ulimit [builtins]    (1)  - bash built-in commands, see bash(1)

la commande interne de bash

> ulimit [unimplemented] (2)  - unimplemented system calls

l'appel syst�me

> d'apr�s man bash(1) le -c veut dire que 1000000 est un string?
> 
> et si je fais man bash -S 1 | grep "ulimit" il n'y a rien!

Vu que c'est une commande interne de bash, cf le man de bash, l'info de
bash, ou alors, plus simplement:

% help ulimit:

Pour ta question,

> # Users generally won't see annoyng core files
> [ "$UID" = "0" ] && ulimit -c 1000000

probablement que par d�faut, les core files sont limit�s � 0 bytes (pas
g�n�r�s), mais pour root (UID 0) on les g�n�re jusqu'� concurrence de
1'000'000 bytes.

lance ed et ensuite tape CTRL-\ (peut-�tre CTRL-ALTgr-\ chez toi), tu
g�n�reras un SIGQUIT (terminer + core). Tu peux ainsi facilement voir ce
que cela fait.

Pis pendant qu'on y est:

schaefer@defian:~% cd /tmp
schaefer@defian:/tmp% ed
Trace/breakpoint trap
schaefer@defian:/tmp% limit -c unlimited
bash: limit: command not found
schaefer@defian:/tmp% ulimit -c unlimited
schaefer@defian:/tmp% ed
Trace/breakpoint trap (core dumped)
schaefer@defian:/tmp% ls -la core
-rw-------    1 schaefer schaefer    69632 Jul 31 12:07 core
schaefer@defian:/tmp% file core
core: ELF 32-bit LSB core file of 'ed' (signal 5), Intel 80386, version 1
schaefer@defian:/tmp% gdb ed core
GNU gdb 19990928
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i686-pc-linux-gnu"...
(no debugging symbols found)...
Core was generated by `ed'.
Program terminated with signal 5, Trace/breakpoint trap.
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols
found)...done.
#0  0x400af4a4 in read () from /lib/libc.so.6
(gdb) where
#0  0x400af4a4 in read () from /lib/libc.so.6
#1  0x400f6cd8 in __check_rhosts_file () from /lib/libc.so.6
#2  0x4006a9cd in _IO_file_underflow () from /lib/libc.so.6
#3  0x4006bacf in _IO_default_uflow () from /lib/libc.so.6
#4  0x4006b9d6 in __uflow () from /lib/libc.so.6
#5  0x40068bdf in getc () from /lib/libc.so.6
#6  0x804af40 in strcpy ()
#7  0x804b776 in strcpy ()
#8  0x40037a42 in __libc_start_main () from /lib/libc.so.6
(gdb) 

(chez moi j'ai envoy� un kill -5 sur le processus)


--
http://www-internal.alphanet.ch/linux-leman/ avant de poser
une question. Ouais, pour se d�sabonner aussi.

Répondre à