[issue31904] Python should support VxWorks RTOS

2019-05-30 Thread LihuaZhao


Change by LihuaZhao :


--
pull_requests:  -12349

___
Python tracker 
<https://bugs.python.org/issue31904>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31904] Python should support VxWorks RTOS

2019-03-17 Thread LihuaZhao


Change by LihuaZhao :


--
pull_requests: +12349

___
Python tracker 
<https://bugs.python.org/issue31904>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31904] Python should support VxWorks RTOS

2019-04-01 Thread LihuaZhao


Change by LihuaZhao :


--
pull_requests: +12578

___
Python tracker 
<https://bugs.python.org/issue31904>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31904] Python should support VxWorks RTOS

2019-04-01 Thread LihuaZhao


Change by LihuaZhao :


--
pull_requests: +12580

___
Python tracker 
<https://bugs.python.org/issue31904>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31904] Python should support VxWorks RTOS

2019-04-07 Thread LihuaZhao


Change by LihuaZhao :


--
pull_requests: +12645

___
Python tracker 
<https://bugs.python.org/issue31904>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36648] MAP_SHARED isn't proper for anonymous mappings for VxWorks

2019-04-17 Thread LihuaZhao


New submission from LihuaZhao :

anonymous mappings is not part of the POSIX standard, python user just need to 
specified -1 as fd value when do anonymous map, for example:

m = mmap.mmap(-1, 100)

then python adapter module(mmapmodule.c) try to specify MAP_SHARED or 
MAP_PRIVATE based on operate system requirement, Linux require MAP_SHARED, 
VxWorks require MAP_PRIVATE, this different should be hidden by this module, 
and python user won't be affected.

Currently, mmap is only adapted for the system which use MAP_SHARED when do 
anonymous map, VxWorks need be supported.

https://en.wikipedia.org/wiki/Mmap

--
components: Library (Lib)
messages: 340411
nosy: lzhao
priority: normal
pull_requests: 12787
severity: normal
status: open
title: MAP_SHARED isn't proper for anonymous mappings for VxWorks
versions: Python 3.8

___
Python tracker 
<https://bugs.python.org/issue36648>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36648] MAP_SHARED isn't proper for anonymous mappings for VxWorks

2019-04-17 Thread LihuaZhao


Change by LihuaZhao :


--
type:  -> enhancement

___
Python tracker 
<https://bugs.python.org/issue36648>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36648] MAP_SHARED isn't proper for anonymous mappings for VxWorks

2019-04-17 Thread LihuaZhao


Change by LihuaZhao :


--
nosy: +vstinner

___
Python tracker 
<https://bugs.python.org/issue36648>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36648] MAP_SHARED isn't proper for anonymous mappings for VxWorks

2019-04-17 Thread LihuaZhao


Change by LihuaZhao :


--
keywords: +patch
pull_requests: +12788
stage:  -> patch review

___
Python tracker 
<https://bugs.python.org/issue36648>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31094] asyncio: get list of connected clients

2019-04-17 Thread LihuaZhao


Change by LihuaZhao :


--
pull_requests: +12789

___
Python tracker 
<https://bugs.python.org/issue31094>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36648] MAP_SHARED isn't proper for anonymous mappings for VxWorks

2019-04-17 Thread LihuaZhao


Change by LihuaZhao :


--
pull_requests:  -12788

___
Python tracker 
<https://bugs.python.org/issue36648>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36648] MAP_SHARED isn't proper for anonymous mappings for VxWorks

2019-04-18 Thread LihuaZhao


LihuaZhao  added the comment:

>>What is the current behavior of m = mmap.mmap(-1, 100)? Does it raise an 
>>exception?

No, the following statement will return -1 without PR 12394

m_obj->data = mmap(NULL, map_size,
   prot, flags,
   fd, offset);

>>I don't understand why PR 12394 modifies flags afterwards, whereas "m = 
>>mmap.mmap(-1, 100)" doesn't specify explicitly flags. So the bug looks to be 
>>default flags set by Python, no?

Yes, this statement doesn't specify the flag, but as you said, the 
new_mmap_object() firstly set MAP_SHARED for flag, and in later code:

if (fd == -1) {
m_obj->fd = -1;
.
#ifdef MAP_ANONYMOUS
/* BSD way to map anonymous memory */
flags |= MAP_ANONYMOUS;

#else
#endif

This routine will pass (MAP_ANONYMOUS | MAP_SHARED) to mmap and fd is -1, this 
is true for Linux, but for VxWorks, if fd is -1, the flag type should be 
(MAP_ANONYMOUS | MAP_PRIVATE), and this behavior is not part of the POSIX 
standard, we can't say VxWorks isn't right.

So my changes clear MAP_SHARED and set MAP_PRIVATE when the system type is 
VxWorks.

>>Is MAP_SHARED constant available in C on VxWorks?

Yes, but for MAP_ANONYMOUS, it require set MAP_PRIVATE.

This PR still is try to enhance VxWorks support, doesn't affect Python user, 
and only change the behavior of VxWorks, other system don't have this issue, 
and also won't be influenced

--

___
Python tracker 
<https://bugs.python.org/issue36648>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com