chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] readline blocks threads


From: Elf
Subject: Re: [Chicken-users] readline blocks threads
Date: Wed, 5 Mar 2008 23:53:53 -0800 (PST)


the problem isnt nonblocking status.
the problem is that all the term settings get munged by readline - how else
could it interpret arrows, tabs, do paren bouncing, etc.
i am working on a pure scheme readlineish lib to compensate with approximately
the same feature set as what is presently there.  it should be done shortly.

however, instead of coding right now, im going through the almost 500 eggs
to make sure that the licence data is correct (ie, the licence tag and the
actual licence match and have the right names, and the docs match the
licences, and that all versioned licences have the proper version appended
to them (eg LGPL-2.1)) because the daily licence muddle has got to stop.

-elf

On Wed, 5 Mar 2008, Shawn Rutledge wrote:

On Tue, Mar 4, 2008 at 4:22 PM, Graham Fawcett <address@hidden> wrote:
 Just curious, does the nbstdin egg help at all? I know it helps when
 I'm running a REPL inside a Web app.

Thanks for the suggestion.  The relevant part of that seems to be this:

 int val = fcntl(fd, F_GETFL, 0);
 if(val == -1) return(0);
 return(fcntl(fd, F_SETFL, val | O_NONBLOCK) != -1);

so I tried doing that myself:

int ufd, sfd;
dbus_connection_get_unix_fd(conn, &ufd);
dbus_connection_get_socket(conn, &sfd);
printf(\"unix FD %d, socket %d\\n\", ufd, sfd);
int val = fcntl(sfd, F_GETFL, 0);
printf(\"existing flags: 0x%X\\n\", val);
if(val != -1)
        printf(\"fctntl returns %d\\n\",
              fcntl(sfd, F_SETFL, val | O_NONBLOCK));

out of which I see

unix FD 4, socket 4
existing flags: 0x802
fctntl returns 0

so according to the existing flags gotten from F_GETFL, it's already a
non-blocking fd.  lsof gives me this

csi       15457 rutledge    4u  unix 0xd935e860            292124 socket

So they're using Unix sockets.  It's already non-blocking, so F_SETFL
doesn't change the behavior.


_______________________________________________
Chicken-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-users





reply via email to

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