[vlc-devel] [PATCH] os2: use socketpair() as a backend for vlc_pipe()

KO Myung-Hun komh78 at gmail.com
Thu Mar 7 07:20:41 CET 2013


Rémi Denis-Courmont wrote:
> On Wed,  6 Mar 2013 12:20:11 +0900, KO Myung-Hun <komh78 at gmail.com> wrote:
>> diff --git a/src/os2/filesystem.c b/src/os2/filesystem.c
>> index b9d03eb..b4ba8db 100644
>> --- a/src/os2/filesystem.c
>> +++ b/src/os2/filesystem.c
>> @@ -334,7 +334,7 @@ int vlc_dup (int oldfd)
>>   */
>>  int vlc_pipe (int fds[2])
>>  {
>> -    if (pipe (fds))
>> +    if (socketpair (AF_LOCAL, SOCK_STREAM, 0, fds))
>>          return -1;
> I don't mind but to truly emulate a pipe with a socket pair, one direction
> need to be shutdown(). In any case, fstat() will return a different file
> type, but I guess we can ignore this subtlety. I do not know if this will
> have undesirable side effects though.

Thanks for your explanation.

It would be good to use pipe() still. Frankly, it seems that now there
is no problem, but there is no need to make a potential problem by
modifying a successfully running codes.

KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.22 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr

More information about the vlc-devel mailing list