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年11月04日 12:49 by hfuru, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| intrcheck.diff | hfuru, 2010年11月04日 12:49 | intcatcher() fixes | ||
| Messages (5) | |||
|---|---|---|---|
| msg120399 - (view) | Author: Hallvard B Furuseth (hfuru) | Date: 2010年11月04日 12:49 | |
Parser/intrcheck.c:intcatcher() can do FILE* operations, which can deadlock if the interrupt happens while a FILE* operation on the same FILE holds a mutex for the FILE. I've seen this happen elsewhere. It'd rather be a pity to remove Py_Exit(), so I suggest switch(interrupted++) gets a case 3 or 4: which does _exit(1), and 'interrupted = 0;' is moved there from case 2. Also 'interrupted' should be volatile sig_atomic_t, and the function should save/restore errno as in Issue 10311. BTW, you could use strlen(message) instead of sizeof(message)-1. |
|||
| msg120845 - (view) | Author: Hallvard B Furuseth (hfuru) | Date: 2010年11月09日 08:42 | |
Sorry, my patch is useless if the OS calls the handler with the signal blocked. It should also unblock the signal before doing anything which can do FILE* operations. And set the handler again? Or just leave the next signal to abort the process? I dunno... Anyway, if you don't do that, just apply the save/restore of errno. Drop the 'if (errno != save_errno)' before restoring, that bit of paranoia was turned down in Issue10311. |
|||
| msg221668 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2014年06月27日 00:05 | |
intrcheck.c no longer exists in cpython so can this be closed "out of date"? |
|||
| msg221677 - (view) | Author: PCManticore (Claudiu.Popa) * (Python triager) | Date: 2014年06月27日 06:16 | |
It's still in Python 2, though. |
|||
| msg382080 - (view) | Author: Irit Katriel (iritkatriel) * (Python committer) | Date: 2020年11月29日 17:21 | |
This is a python 2-only issue. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:08 | admin | set | github: 54521 |
| 2020年11月29日 17:21:26 | iritkatriel | set | status: open -> closed nosy: + iritkatriel messages: + msg382080 resolution: out of date stage: resolved |
| 2019年04月26日 20:33:32 | BreamoreBoy | set | nosy:
- BreamoreBoy |
| 2014年09月02日 13:00:41 | Claudiu.Popa | set | nosy:
- Claudiu.Popa |
| 2014年06月27日 06:16:36 | Claudiu.Popa | set | status: closed -> open versions: - Python 3.1, Python 3.2 nosy: + Claudiu.Popa messages: + msg221677 resolution: out of date -> (no value) stage: resolved -> (no value) |
| 2014年06月27日 06:13:12 | Claudiu.Popa | set | status: open -> closed resolution: out of date stage: resolved |
| 2014年06月27日 00:05:06 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg221668 |
| 2011年01月03日 23:48:54 | pitrou | set | nosy:
+ vstinner |
| 2010年11月09日 08:42:22 | hfuru | set | messages: + msg120845 |
| 2010年11月04日 13:19:21 | hfuru | set | versions: + Python 3.1, Python 2.7 |
| 2010年11月04日 12:50:10 | pitrou | set | nosy:
+ benjamin.peterson |
| 2010年11月04日 12:49:00 | hfuru | create | |