Mercurial > emacs
comparison src/w32.c @ 21565:2468c9227af0
(sys_pipe): Use binary pipe I/O unconditionally.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Wed, 15 Apr 1998 14:40:43 +0000 |
parents | c0496e62b737 |
children | 60b840947a09 |
comparison
equal
deleted
inserted
replaced
21564:62a4efbdc4b4 | 21565:2468c9227af0 |
---|---|
2330 fd_info[dst] = fd_info[src]; | 2330 fd_info[dst] = fd_info[src]; |
2331 } | 2331 } |
2332 return rc; | 2332 return rc; |
2333 } | 2333 } |
2334 | 2334 |
2335 /* From callproc.c */ | |
2336 extern Lisp_Object Vbinary_process_input; | |
2337 extern Lisp_Object Vbinary_process_output; | |
2338 | |
2339 /* Unix pipe() has only one arg */ | 2335 /* Unix pipe() has only one arg */ |
2340 int | 2336 int |
2341 sys_pipe (int * phandles) | 2337 sys_pipe (int * phandles) |
2342 { | 2338 { |
2343 int rc; | 2339 int rc; |
2350 if required. */ | 2346 if required. */ |
2351 rc = _pipe (phandles, 0, _O_NOINHERIT | _O_BINARY); | 2347 rc = _pipe (phandles, 0, _O_NOINHERIT | _O_BINARY); |
2352 | 2348 |
2353 if (rc == 0) | 2349 if (rc == 0) |
2354 { | 2350 { |
2355 flags = FILE_PIPE | FILE_READ; | 2351 flags = FILE_PIPE | FILE_READ | FILE_BINARY; |
2356 if (!NILP (Vbinary_process_output)) | |
2357 flags |= FILE_BINARY; | |
2358 fd_info[phandles[0]].flags = flags; | 2352 fd_info[phandles[0]].flags = flags; |
2359 | 2353 |
2360 flags = FILE_PIPE | FILE_WRITE; | 2354 flags = FILE_PIPE | FILE_WRITE | FILE_BINARY; |
2361 if (!NILP (Vbinary_process_input)) | |
2362 flags |= FILE_BINARY; | |
2363 fd_info[phandles[1]].flags = flags; | 2355 fd_info[phandles[1]].flags = flags; |
2364 } | 2356 } |
2365 | 2357 |
2366 return rc; | 2358 return rc; |
2367 } | 2359 } |