>>> I have written a client/server program using libc 5.3.12
>>> on Linux 2.0.33.  The server program communicates with
>>> the client via socket.  The server executes a python
>>> script ( specified by the client ) in the same process,
>>> and returns the data which have been written to "stdout"
>>> by the script.
>>> 
>>> Now I'm in trouble because the script executed by the server
>>> can't write large data to "stdout".
>>> 
>>> Then I have written a simple program ( bottom of this message )
>>> which consists of the part of the server program and a dummy
>>> function ( read_and_write() ) instead of the function executes
>>> a python script.  In addition, this program writes data to
>>> a file instead of sending data to a client.  And I ran it.
>>> 
>>> If the size of the file "sample.dat" was 65535 bytes and under,
>>> the program terminated with no errors. But the size was over
>>> 65535 bytes, the fwrite() call in the read_and_write() failed
>>> and "errno" was set to 512.
>
>> 512 is ERESTARTSYS. This error should never be seen by application
>> code; libc is supposed to restart the system call.
>
>It is not libcs job to restart, but the kernel's job. Even libc should
>never see it (with the only exception of strace - the original poster 
>didn't run his program under strace or gdb, did he?). If he didn't it is a bug.
>
>> Try upgrading to a newer version of libc (the 5.3.* versions are
>> supposedly development versions).
>
>Not needed. 5.3 is fine.
>


Thank you for all your help.

I didn't run my program under strace or gdb.
I try to look for a patch.

Thank you.


Masahiko Shimoda

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to