This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2010年08月13日 18:47 by Volodymyr.Kostyrko, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| test.py | Volodymyr.Kostyrko, 2010年08月13日 18:47 | select.kqueue test, reads data from stdin, reports kevents, exits on file end (?) | ||
| Messages (4) | |||
|---|---|---|---|
| msg113811 - (view) | Author: Volodymyr Kostyrko (Volodymyr.Kostyrko) | Date: 2010年08月13日 18:47 | |
This one is BSD related. FreeBSD 8.1. This works: # cat test.py | ./test.py -1 684 32768 0 0 # This hangs: # ./test.py < file -1 684 0 0 0 The difference is that in second case popped kevent lacks any data on EOF. |
|||
| msg114432 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2010年08月20日 17:14 | |
I presume the first example should have been # cat file | ./test.py or seceond should have been # ./test.py < test.py so that test.py gets same input on stdin in either case. For other readers: kqueue and kevent are bsd-specific functions and classes in the select module. In the first output, 32786 (== 1 << 15) is the EOF flag missing in the second output. I wonder is this is really a python issue. I would expect that kqueue and kevent are thin wrappers for the os calls and objects and that python should be indifferent to the source of stdin data. You could check the C source. I do not know if there are any developers currently familiar with the innards of bsd. |
|||
| msg114479 - (view) | Author: Volodymyr Kostyrko (Volodymyr.Kostyrko) | Date: 2010年08月21日 05:25 | |
Ok, I'll try to ask FreeBSD developers, too bad I'm not that familiar with C to write example other way than test if it's a system problem. |
|||
| msg165695 - (view) | Author: Volodymyr Kostyrko (Volodymyr.Kostyrko) | Date: 2012年07月17日 10:24 | |
I was wrong. The current behavior is correct. The difference between execution is a difference between pipe file object and vnode file object. vnode backed file objects doesn't send any signals and care should be taken to detect file position. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:05 | admin | set | github: 53800 |
| 2012年07月17日 10:24:07 | Volodymyr.Kostyrko | set | status: open -> closed resolution: not a bug messages: + msg165695 |
| 2010年08月21日 05:25:49 | Volodymyr.Kostyrko | set | nosy:
- terry.reedy messages: + msg114479 |
| 2010年08月20日 17:14:37 | terry.reedy | set | nosy:
+ terry.reedy messages: + msg114432 |
| 2010年08月13日 18:53:03 | Volodymyr.Kostyrko | set | title: kqueu not reporting EOF under certain circumstances -> kqueue not reporting EOF under certain circumstances |
| 2010年08月13日 18:47:22 | Volodymyr.Kostyrko | create | |