Java Mailing List Archive

http://www.redhatconfig.com/

Home » Red Hat Linux Discussion »

RE: bug in glibc?

Dr Alan J Bartlett

2008-01-18

Replies:

Author LoginPost Reply






KK,

I am running CentOS 5, update 1 ( == RHEL 5.1) and thought I would mimic your test.

$ uname -a
Linux stxsl 2.6.18-53.1.4.el5.stxsl #1 SMP Tue Jan 8 21:29:57 GMT 2008 i686 i686 i386 GNU/Linux
$ rpm -q glibc
glibc-2.5-18.el5_1.1
$ ldd zxc
    linux-gate.so.1 => (0x00343000)
    libc.so.6 => /lib/libc.so.6 (0x00b3d000)
    /lib/ld-linux.so.2 (0x0016e000)
$ cat zxc.c
#include     <stdio.h>
#include     <stdlib.h>
#include     <unistd.h>

main()
{
    int a = 0;

    while (1) {
          printf("XXX(%d)",++a);
          (void) sleep(1);
          if (fork() == 0) {
               printf("\n");
               exit(0);
          }
    }
}
$ ./zxc
XXX(1)
XXX(1)XXX(2)
XXX(1)XXX(2)XXX(3)
XXX(1)XXX(2)XXX(3)XXX(4)
XXX(1)XXX(2)XXX(3)XXX(4)XXX(5)
XXX(1)XXX(2)XXX(3)XXX(4)XXX(5)XXX(6)

$

You are not alone!

Regards,
Alan.


_________________________________________________________________
Free games, great prizes - get gaming at Gamesbox.
http://www.searchgamesbox.com--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@(protected)
https://www.redhat.com/mailman/listinfo/redhat-list
©2008 redhatconfig.com - Jax Systems, LLC, U.S.A.