On Fri, Mar 25, 2011 at 4:46 PM, Alexander Burger <a...@software-lab.de> wrote:
> Hi Edwin,
>> > But both are necessary: (close S) to free the socket file descriptor,
>> > and (task S) to remove the corresponding entry from the list in '*Run'.
>> is this in the context of multiple picolisp processes? figured S is
>> just a socket and calling (close) in a non forking server would be ok?
> It doesn't matter whether there are multiple picolisp processes: Both
> the open file descriptor, and the list of tasks in '*Run', are private
> to each process.
in this light, i might have been asking the wrong question...
> So if you just close the file descriptor, but don't remove it from the
> task list, you'll get a "Key conflict" error when the next time a new
> socket with that file descriptor number is assigned a 'task', or when
> the event handler processing '*Run' passes the closed file descriptor to
what's the reason for running it via (task) in the first place?