chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] about egg/pty


From: Christian Kellermann
Subject: Re: [Chicken-users] about egg/pty
Date: Fri, 20 Feb 2015 09:27:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Hi!

Chaos Eternal <address@hidden> writes:

> uses a magic number 1024 , which used to pack master fd and slave fd
> into one integer to return.
>
> but why 1024 and what happens when the slave fd is greater than 1024?

I am not the author but 1024 happens to be the default maximum number of
open files for most systems(tm).

And yes if that assumption is wrong it will break and do strange things.

As I see it it's just a quick hack to get both values out of C without
further FFI tricks. Maybe I am wrong and Alex can explain the rationale
behind it, if there is any.

Kind regards,

Christian

-- 
May you be peaceful, may you live in safety, may you be free from
suffering, and may you live with ease.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]