Issue1074
Created on 2008-07-16.18:08:20 by cheeming, last changed 2008-09-13.23:18:43 by zyasoft.
| msg3339 (view) |
Author: Chew Chee Ming (cheeming) |
Date: 2008-07-16.18:08:19 |
|
I tried out jython with a project from work and we use the signal
module. We also use twisted quite a bit and twisted also uses signal
module. And also the "fcntl" module but that is just a pretty small part.
|
| msg3341 (view) |
Author: Philip Jenvey (pjenvey) |
Date: 2008-07-17.01:36:24 |
|
This is really two different bugs
Chris McClimans had started creating a signal module a few months ago
while trying to port IPython to jython. Java doesn't expose any official
API for dealing with signals, but there's actually some undocumented
facilities for it in sun.misc. He pastebin'd what he had so far here:
http://pylonshq.com/pasties/646
and a test for it here:
http://pylonshq.com/pasties/647
fcntl could be implemented via JNA. It would also require Python files
to return their real file descriptor via fileno() -- currently it
returns a fake file descriptor, because Java doesn't allow access to the
real one (which is in a private field in java.io.FileDescriptor). We
could 'steal' it via reflection, though -- which is what JRuby does
|
| msg3344 (view) |
Author: Chew Chee Ming (cheeming) |
Date: 2008-07-17.12:32:27 |
|
Thanks for the info about the signal module.
For the code in http://pylonshq.com/pasties/646
I tried using it in Jython@r4960 and I found that it doesn't support
signal EMT and INFO. I am using java version 1.5.0_14.
|
| msg3476 (view) |
Author: Glyph Lefkowitz (glyph) |
Date: 2008-09-06.16:40:38 |
|
Twisted definitely needs this to function: see also issue1122.
|
| msg3519 (view) |
Author: Jim Baker (zyasoft) |
Date: 2008-09-13.18:28:30 |
|
Twisted has a patch for signal that we're evaluating for ipython and
twisted:
http://twistedmatrix.com/trac/attachment/ticket/3413/signal.py
There's no EMT signal in that patch. Digging on this a bit, EMT is an
AIX-specific signal. Cheeming, is there anything required here other
than uncommenting it out in the patch?
http://www.ibm.com/developerworks/java/library/i-signalhandling/
|
| msg3551 (view) |
Author: Glyph Lefkowitz (glyph) |
Date: 2008-09-13.23:15:41 |
|
INFO and EMT are commented out because the original signal module (which
I stole from pylons' pastebin) raised an exception when trying to define
those signals.
A better signal module would loop over the list of signals and catch the
exception.
|
| msg3552 (view) |
Author: Jim Baker (zyasoft) |
Date: 2008-09-13.23:18:42 |
|
Matt Boersma is working on a version of signals.py that does the right
thing in terms of working across windows, etc., so that ipython will
work. So that will fix the issue with EMT, etc.
|
|
| Date |
User |
Action |
Args |
| 2008-09-13 23:18:43 | zyasoft | set | messages:
+ msg3552 |
| 2008-09-13 23:15:41 | glyph | set | messages:
+ msg3551 |
| 2008-09-13 18:28:30 | zyasoft | set | nosy:
+ zyasoft, mboersma messages:
+ msg3519 |
| 2008-09-06 16:40:38 | glyph | set | nosy:
+ glyph messages:
+ msg3476 |
| 2008-07-17 12:32:27 | cheeming | set | messages:
+ msg3344 |
| 2008-07-17 01:36:27 | pjenvey | set | nosy:
+ pjenvey messages:
+ msg3341 |
| 2008-07-16 18:08:20 | cheeming | create | |
|