You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Li Jing Qin (JIRA)" <ji...@apache.org> on 2009/06/15 10:45:07 UTC

[jira] Created: (HARMONY-6232) [classlib][luni] sendfile should not return -1 when EAGAIN is fired.

[classlib][luni] sendfile should not return -1 when EAGAIN is fired.
--------------------------------------------------------------------

                 Key: HARMONY-6232
                 URL: https://issues.apache.org/jira/browse/HARMONY-6232
             Project: Harmony
          Issue Type: Bug
         Environment: linux
            Reporter: Li Jing Qin


When transferring file with NONBLOCKING mode, an EAGAIN will be returned by errno. This is because two ends is related to the sending file. If one end is much faster than the other, this end will block though setting NONBLOCKING. So we should return the actually bytes we have transfered and ignore the EAGAIN.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-6232) [classlib][luni] sendfile should not return -1 when EAGAIN is fired.

Posted by "Li Jing Qin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Li Jing Qin updated HARMONY-6232:
---------------------------------

    Attachment: test.txt

This is the test file i'm using.

> [classlib][luni] sendfile should not return -1 when EAGAIN is fired.
> --------------------------------------------------------------------
>
>                 Key: HARMONY-6232
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6232
>             Project: Harmony
>          Issue Type: Bug
>         Environment: linux
>            Reporter: Li Jing Qin
>         Attachments: MySendFileTest.java, SendFileClient.java, SendFileServer.java, test.txt
>
>
> When transferring file with NONBLOCKING mode, an EAGAIN will be returned by errno. This is because two ends is related to the sending file. If one end is much faster than the other, this end will block though setting NONBLOCKING. So we should return the actually bytes we have transfered and ignore the EAGAIN.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-6232) [classlib][luni] sendfile should not return -1 when EAGAIN is fired.

Posted by "Li Jing Qin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Li Jing Qin updated HARMONY-6232:
---------------------------------

    Attachment:     (was: HARMONY-6232.diff)

> [classlib][luni] sendfile should not return -1 when EAGAIN is fired.
> --------------------------------------------------------------------
>
>                 Key: HARMONY-6232
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6232
>             Project: Harmony
>          Issue Type: Bug
>         Environment: linux
>            Reporter: Li Jing Qin
>         Attachments: HARMONY-6232.diff, MySendFileTest.java, SendFileClient.java, SendFileServer.java, test.txt
>
>
> When transferring file with NONBLOCKING mode, an EAGAIN will be returned by errno. This is because two ends is related to the sending file. If one end is much faster than the other, this end will block though setting NONBLOCKING. So we should return the actually bytes we have transfered and ignore the EAGAIN.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-6232) [classlib][luni] sendfile should not return -1 when EAGAIN is fired.

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov updated HARMONY-6232:
-------------------------------------

    Component/s: Classlib

> [classlib][luni] sendfile should not return -1 when EAGAIN is fired.
> --------------------------------------------------------------------
>
>                 Key: HARMONY-6232
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6232
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: linux
>            Reporter: Li Jing Qin
>         Attachments: HARMONY-6232.diff, MySendFileTest.java, SendFileClient.java, SendFileServer.java, test.txt
>
>
> When transferring file with NONBLOCKING mode, an EAGAIN will be returned by errno. This is because two ends is related to the sending file. If one end is much faster than the other, this end will block though setting NONBLOCKING. So we should return the actually bytes we have transfered and ignore the EAGAIN.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-6232) [classlib][luni] sendfile should not return -1 when EAGAIN is fired.

Posted by "Li Jing Qin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Li Jing Qin updated HARMONY-6232:
---------------------------------

    Attachment: HARMONY-6232.diff

This is fixes.

> [classlib][luni] sendfile should not return -1 when EAGAIN is fired.
> --------------------------------------------------------------------
>
>                 Key: HARMONY-6232
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6232
>             Project: Harmony
>          Issue Type: Bug
>         Environment: linux
>            Reporter: Li Jing Qin
>         Attachments: HARMONY-6232.diff, MySendFileTest.java, SendFileClient.java, SendFileServer.java, test.txt
>
>
> When transferring file with NONBLOCKING mode, an EAGAIN will be returned by errno. This is because two ends is related to the sending file. If one end is much faster than the other, this end will block though setting NONBLOCKING. So we should return the actually bytes we have transfered and ignore the EAGAIN.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-6232) [classlib][luni] sendfile should not return -1 when EAGAIN is fired.

Posted by "Li Jing Qin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720585#action_12720585 ] 

Li Jing Qin commented on HARMONY-6232:
--------------------------------------

OOPS. I found this patch may failed on NOT AIX, NOT ZOS and NOT FREEBSD machine. I will change it ASAP.

> [classlib][luni] sendfile should not return -1 when EAGAIN is fired.
> --------------------------------------------------------------------
>
>                 Key: HARMONY-6232
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6232
>             Project: Harmony
>          Issue Type: Bug
>         Environment: linux
>            Reporter: Li Jing Qin
>         Attachments: HARMONY-6232.diff, MySendFileTest.java, SendFileClient.java, SendFileServer.java, test.txt
>
>
> When transferring file with NONBLOCKING mode, an EAGAIN will be returned by errno. This is because two ends is related to the sending file. If one end is much faster than the other, this end will block though setting NONBLOCKING. So we should return the actually bytes we have transfered and ignore the EAGAIN.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-6232) [classlib][luni] sendfile should not return -1 when EAGAIN is fired.

Posted by "Li Jing Qin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Li Jing Qin updated HARMONY-6232:
---------------------------------

    Attachment: HARMONY-6232.diff

New patch is attached. Would anyone wanna to try it?

> [classlib][luni] sendfile should not return -1 when EAGAIN is fired.
> --------------------------------------------------------------------
>
>                 Key: HARMONY-6232
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6232
>             Project: Harmony
>          Issue Type: Bug
>         Environment: linux
>            Reporter: Li Jing Qin
>         Attachments: HARMONY-6232.diff, MySendFileTest.java, SendFileClient.java, SendFileServer.java, test.txt
>
>
> When transferring file with NONBLOCKING mode, an EAGAIN will be returned by errno. This is because two ends is related to the sending file. If one end is much faster than the other, this end will block though setting NONBLOCKING. So we should return the actually bytes we have transfered and ignore the EAGAIN.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-6232) [classlib][luni] sendfile should not return -1 when EAGAIN is fired.

Posted by "Li Jing Qin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-6232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Li Jing Qin updated HARMONY-6232:
---------------------------------

    Attachment: SendFileServer.java
                SendFileClient.java
                MySendFileTest.java

Java file for test.

> [classlib][luni] sendfile should not return -1 when EAGAIN is fired.
> --------------------------------------------------------------------
>
>                 Key: HARMONY-6232
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6232
>             Project: Harmony
>          Issue Type: Bug
>         Environment: linux
>            Reporter: Li Jing Qin
>         Attachments: MySendFileTest.java, SendFileClient.java, SendFileServer.java
>
>
> When transferring file with NONBLOCKING mode, an EAGAIN will be returned by errno. This is because two ends is related to the sending file. If one end is much faster than the other, this end will block though setting NONBLOCKING. So we should return the actually bytes we have transfered and ignore the EAGAIN.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.