[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: problem with GNU C



From: "Martijn van Oosterhout" <kleptog@svana.org>

> The only thing I can think of (since you didn't indicate what the
> differences were between the two boxes) is the first argument you passed
to
> select(). I'm pretty sure you'll never have 31000 descriptors open and I'm
> not even sure if the default fd_set can hold that many, leading to your
> stack being trashed.
>
> Other things: you should use snprintf, not sprintf and setting the 100th
> byte to null is a waste of time.

The real reason of termination: program receives SIGPIPE on send(). Select()
says that socket is writeable alredy. Removing fcntl will resolve problem.
Any ideas?

Ilya



Reply to: